Multi-behavior sequence recommendation method and system based on multi-interest self-supervised learning
Patent Information
- Application Number
- CN202611086664.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-09
AI Technical Summary
[0006]本发明针对现有多行为推荐大多未考虑多种行为之间的差异,忽略了不同行为背后反映的不同用户兴趣,导致物品推荐存在偏差的问题,提出一种基于多兴趣自监督学习的多行为序列推荐方法及系统
[0037]1、本发明突破了传统推荐系统将多种用户行为简单视为同质交互的技术局限,通过将行为类型区分为目标行为与辅助行为,并针对不同行为类型分别构建独立的行为感知表示空间,使得模型能够显式地捕捉不同交互行为背后所蕴含的用户偏好强度差异与兴趣层次差异。相比于现有技术中忽略行为间差异或仅简单拼接行为特征的方式,本发明从根本上解决了多行为数据异构性导致推荐偏差的技术难题。
Smart Images

Figure CN122886680A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a multi-behavioral sequence recommendation method and system based on multi-interest self-supervised learning, which can be used for user interest modeling and item recommendation in scenarios such as personalized recommendation systems, e-commerce platforms, and content delivery networks. Background Technology
[0002] Sequence recommendation systems are gaining increasing attention; they predict a user's next potentially interesting item by analyzing their historical behavior. Traditional sequence recommendation models typically use only one type of user-item interaction, facing severe data sparsity or cold start problems. Multi-behavior recommendation, employing multiple types of user-item interactions (such as browsing, saving, adding to cart, and purchasing), can serve as an effective solution. Multi-behavior recommendation utilizes various user interactions to enrich users' personalized preferences from multiple perspectives.
[0003] In real-world scenarios, user interactions are diverse, categorized into target behaviors (such as purchasing) and auxiliary behaviors (such as clicking, adding to favorites, and adding to cart). These behaviors reflect the diversity of user needs. For example, ... Figure 1 As shown, after browsing headphones, the user decisively purchased a dress. This interaction shift appears unusual if we disregard the change in behavior type ("browsing" → "purchasing"), which leads to a shift in interest ("electronics" → "clothing"), causing the interactive item to switch ("headphones" → "dress"). Therefore, this change would affect the model's learning process.
[0004] Furthermore, user interests exhibit significant differences across different behaviors. For example... Figure 2 Users with average spending power show a weaker or even no interest in luxury goods during purchasing (interest value of 0.05) compared to their browsing behavior (interest value of 0.45). Therefore, in user behavior recommendation, different behaviors may represent different levels of user preference. Browsing behavior may reflect initial interest, while purchasing behavior indicates final preference. From clicking to adding to cart to placing an order, user behavior often implies a degree of "gradualness," with user liking / inclination changing.
[0005] This demonstrates that different behaviors reflect different user interests, which drive the differences in behavioral patterns and reveal the intensity, stability, and evolutionary trends of these interests. Most existing studies have not fully considered the differences between various user behaviors (such as clicking, saving, and purchasing), while this invention mines fine-grained interest representations from multi-behavioral interaction data, explicitly modeling the differentiated user interest preferences implicit behind different behavior types. Summary of the Invention
[0006] This invention addresses the problem that most existing multi-behavior recommendation methods fail to consider the differences between various behaviors and ignore the different user interests reflected in different behaviors, leading to biased item recommendations. It proposes a multi-behavior sequence recommendation method and system based on multi-interest self-supervised learning. First, it uses an item attribute encoder to learn the product attribute embeddings. Then, it utilizes a hypergraph transformer network-based behavior-aware multi-interest encoder to simultaneously learn item representations and multi-interest representations under different behaviors. Simultaneously, a multi-interest self-supervised contrastive learning auxiliary task is employed to maximize the consistency between items and their behavioral interests. Furthermore, a behavior-aware constraint optimization framework is proposed, introducing behavior relevance constraints into the objective function of the multi-behavior recommendation system to optimize recommendation performance.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] This invention proposes a multi-behavior sequence recommendation method based on multi-interest self-supervised learning, comprising:
[0009] Acquire multi-behavioral interaction sequence data of the user, the interaction sequence data including the timestamp of the user's interaction with the item, the item's identity identifier, and the corresponding behavior type;
[0010] Construct a behavior-aware embedding layer, encode each item in the interaction sequence data into an initial item embedding vector that integrates item attribute semantics, behavior semantics and temporal location information, and initialize a set of learnable interest prototype embedding vectors for each behavior type.
[0011] A behavior-aware multi-interest encoder is constructed based on a hypergraph Transformer network. Bidirectional information propagation is performed between item nodes and interest prototype nodes to refine the item embedding vector and the interest prototype embedding vector. The bidirectional information propagation includes: forward propagation from item nodes to interest prototype nodes to aggregate the features of interactive items to interest prototypes; and backward propagation from interest prototype nodes to item nodes to transmit interest semantics back to item nodes. Attention scores between each item and each interest prototype are calculated based on an attention mechanism.
[0012] A multi-interest self-supervised contrastive learning auxiliary task is introduced. Based on the attention score, an associated interest prototype is determined for each item. The item and its associated interest prototype are formed into positive sample pairs, and the item and other interest prototypes are formed into negative sample pairs. The contrastive learning loss function is used to bring the positive sample pairs closer and push the negative sample pairs further apart, so as to enhance the feature discriminativeness of item embedding and interest prototype embedding.
[0013] A behavior-item sequence encoding layer is constructed. The refined item sequence embedding and interest sequence embedding are input into the item encoder and behavior encoder of the behavior-item sequence encoding layer, respectively. The item sequence and behavior sequence are interacted and fused through a cross-attention module to obtain the fused sequence. The embedding vector of the last time step is extracted from the fused sequence as the final user preference representation.
[0014] A training optimization framework for behavior awareness is constructed, and a joint loss function is defined, which includes the contrastive learning loss; the model parameters are jointly optimized and trained by minimizing the joint loss function.
[0015] The similarity between the trained end-user preference representation and the candidate item embedding is calculated, and a Top-N recommendation list is generated and output based on the calculation results.
[0016] Furthermore, encoding each item in the interaction sequence data into an initial item embedding vector that integrates item attribute semantics, behavioral semantics, and temporal location information specifically includes:
[0017] All attribute text information of an item is converted into key-value attribute pairs, and all key-value attribute pairs are flattened into an item sentence; a marker [CLS] is added to the beginning of the item sentence sequence; the item sentence with the added marker is input into a pre-trained Recformer model, and the output vector at the position corresponding to the marker [CLS] is extracted as the attribute semantic embedding vector of the item.
[0018] Furthermore, the forward propagation from the item node to the interest prototype node and the backward propagation from the interest prototype node to the item node are both calculated using a Transformer-style multi-head attention mechanism. In the backward propagation, the attention score matrix between each item node and each interest prototype node is calculated by scaling dot product attention, and this attention score matrix is used as the basis for determining the associated interest prototype.
[0019] Furthermore, the behavior-aware multi-interest encoder is also configured with a hierarchical hypergraph neural network, which contains a two-layer network structure for mining nonlinear feature interactions between interest hyperedges; and residual connections are introduced during the bidirectional information propagation process to enhance the gradient propagation effect.
[0020] Furthermore, the contrastive learning loss function adopts the InfoNCE loss function, which calculates the similarity between item embeddings and interest prototype embeddings based on the cosine similarity function; and the multi-interest self-supervised contrastive learning auxiliary task calculates the sum of the contrastive losses of all items and their associated interests under each behavior type as the global self-supervised loss.
[0021] Furthermore, the cross-attention module specifically performs the following bidirectional interactive operations:
[0022] Using behavior sequence embeddings as queries and item sequence embeddings as keys and values, the first cross-attention output is calculated to achieve attention to item features from a behavior perspective;
[0023] Using item sequence embeddings as queries and behavior sequence embeddings as keys and values, a second cross-attention output is calculated to achieve attention to behavioral features from the perspective of items;
[0024] The first cross-attention output and the second cross-attention output are used as the fused sequence.
[0025] Furthermore, the joint loss also includes an item prediction loss for predicting the next interactive item, a behavior prediction loss for predicting the next interactive behavior type, and a mutual information loss for maximizing the mutual information between the current item prediction result and the actual behavior representation.
[0026] Furthermore, both the item prediction loss and the behavior prediction loss are constructed based on the cross-entropy loss function, which are used to supervise the prediction of the interactive items and interactive behavior types in the next time step, respectively.
[0027] Furthermore, the behavior type includes target behavior and auxiliary behavior, wherein the target behavior is an interactive behavior used to characterize the user's final conversion intention, and the auxiliary behavior is an interactive behavior used to characterize the user's intermediate interest tendency.
[0028] This invention also proposes a multi-behavior sequence recommendation system based on multi-interest self-supervised learning, comprising:
[0029] A multi-behavior data acquisition unit is used to acquire multi-behavior interaction sequence data of users, wherein the interaction sequence data includes timestamps of user-item interaction, item identification, and corresponding behavior types.
[0030] The initial embedding learning unit is used to construct the behavior-aware embedding layer. It encodes each item in the interaction sequence data into an initial item embedding vector that integrates item attribute semantics, behavior semantics and temporal location information, and initializes a set of learnable interest prototype embedding vectors for each behavior type.
[0031] A bidirectional information propagation unit is used to construct a behavior-aware multi-interest encoder. Based on a hypergraph Transformer network, it performs bidirectional information propagation between item nodes and interest prototype nodes to refine item embedding vectors and interest prototype embedding vectors. The bidirectional information propagation includes: forward propagation from item nodes to interest prototype nodes to aggregate the features of interactive items to interest prototypes; and backward propagation from interest prototype nodes to item nodes to transmit interest semantics back to item nodes. Attention scores between each item and each interest prototype are calculated based on an attention mechanism.
[0032] The interest self-supervised learning unit is used to introduce multi-interest self-supervised contrastive learning to assist tasks. Based on the attention score, it determines the associated interest prototype for each item, forms positive sample pairs with the item and its associated interest prototype, and forms negative sample pairs with the item and other interest prototypes. The contrastive learning loss function is used to bring the positive sample pairs closer and push the negative sample pairs further apart, so as to enhance the feature discriminativeness of item embedding and interest prototype embedding.
[0033] The sequence feature learning unit is used to construct the behavior-item sequence encoding layer. The refined item sequence embedding and interest sequence embedding are input into the item encoder and behavior encoder of the behavior-item sequence encoding layer, respectively. The item sequence and behavior sequence are interacted and fused through the cross attention module to obtain the fused sequence. The embedding vector of the last time step is extracted from the fused sequence as the final user preference representation.
[0034] A joint optimization training unit is used to construct a behavior-aware training optimization framework, and a joint loss function is defined, which includes the contrastive learning loss; the model parameters are jointly optimized and trained by minimizing the joint loss function.
[0035] The recommendation unit is used to calculate the similarity between the trained end-user preference representation and the candidate item embedding, and generate and output a Top-N recommendation list based on the calculation results.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] 1. This invention overcomes the technical limitation of traditional recommendation systems that simply treat various user behaviors as homogeneous interactions. By distinguishing behavior types into target behaviors and auxiliary behaviors, and constructing independent behavior-aware representation spaces for different behavior types, the model can explicitly capture the differences in user preference intensity and interest levels underlying different interactive behaviors. Compared to existing technologies that ignore differences between behaviors or simply concatenate behavior features, this invention fundamentally solves the technical problem of recommendation bias caused by the heterogeneity of multi-behavioral data.
[0038] 2. To address the sparsity problem of interaction data prevalent in recommender systems, this invention constructs an information propagation mechanism based on a high-order association structure. By establishing non-paired many-to-many associations between interactive items and interest prototypes, it achieves the full propagation and sharing of limited interaction information globally. Compared to traditional graph structures that rely solely on pairwise relationships, this mechanism can more efficiently utilize sparse interaction data, effectively alleviating the constraint of data sparsity on recommender performance and significantly improving the representation ability of long-tail items and cold-start users.
[0039] 3. To address the technical bottleneck of lacking user interest-annotated data in real-world recommendation scenarios, this invention designs a self-supervised reinforcement learning mechanism based on the mining of inter-sample associations. By constructing consistency constraints between interactive items and the interest representations associated with their own interactive behaviors, the model can autonomously learn highly discriminative item and interest feature representations without manual annotation. This mechanism effectively overcomes the limitations of traditional methods that rely on large amounts of labeled data for supervised learning, improving the model's applicability and robustness in scenarios with scarce annotations.
[0040] 4. This invention addresses the heterogeneous nature of item information and behavioral information coexisting in user interaction sequences by constructing an information fusion architecture of dual-channel sequence encoding and cross-attention. This architecture enables full bidirectional interaction and deep fusion between the content semantics carried by the item sequence and the intent semantics carried by the behavioral sequence at the sequence level. Compared to existing multi-behavioral sequence modeling methods that process or simply splice multiple behaviors separately, this mechanism can accurately capture the intrinsic correlation between user interest evolution and behavioral changes, thereby obtaining a more comprehensive and accurate representation of user preferences.
[0041] 5. This invention proposes a joint optimization training framework that integrates multiple supervision signals. During model training, it simultaneously introduces supervision for predicting the next interactive item, predicting the next interactive behavior type, and constraining the correlation between the current item prediction and the actual behavior representation. This forms a multi-perspective supervision signal system covering both "content dimension" and "behavioral dimension." The complementary and synergistic optimization of these multiple supervision signals makes the model training process more stable and convergence more efficient, significantly improving the final recommendation accuracy and generalization ability.
[0042] 6. Thanks to the combined effects of the above-mentioned behavior-aware representation mechanism, higher-order association enhancement mechanism, self-supervised discriminative learning mechanism, heterogeneous sequence fusion mechanism, and multi-task joint optimization mechanism, the experimental results of the overall technical solution of this invention on multiple public datasets show that the core evaluation indicators such as recommendation accuracy and recall are significantly better than the existing best methods, which fully verifies the effectiveness and advancement of the technical solution of this invention. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the user-item interaction sequence provided in the background art of this invention;
[0044] Figure 2 This refers to the changes in user interest intensity under different behaviors, as provided in the background technology of this invention.
[0045] Figure 3 A flowchart of a multi-behavior sequence recommendation method based on multi-interest self-supervised learning provided in this embodiment of the invention;
[0046] Figure 4 A framework diagram of a multi-behavior sequence recommendation method based on multi-interest self-supervised learning provided in an embodiment of the present invention;
[0047] Figure 5 The ablation experiment results on the Yelp dataset provided in this embodiment of the invention;
[0048] Figure 6 The ablation experimental results on the IJCAI dataset provided in this embodiment of the invention;
[0049] Figure 7 The impact of different numbers of interests M on model performance on the Yelp dataset provided in this embodiment of the invention;
[0050] Figure 8 This is a schematic diagram of the architecture of a multi-behavior sequence recommendation system based on multi-interest self-supervised learning, according to an embodiment of the present invention. Detailed Implementation
[0051] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0052] like Figure 3 As shown, a multi-behavior sequence recommendation method based on multi-interest self-supervised learning (MIBRec) includes:
[0053] Acquire multi-behavioral interaction sequence data of the user, the interaction sequence data including the timestamp of the user's interaction with the item, the item's identity identifier, and the corresponding behavior type;
[0054] Construct a behavior-aware embedding layer, encode each item in the interaction sequence data into an initial item embedding vector that integrates item attribute semantics, behavior semantics and temporal location information, and initialize a set of learnable interest prototype embedding vectors for each behavior type.
[0055] A behavior-aware multi-interest encoder is constructed based on a hypergraph Transformer network. Bidirectional information propagation is performed between item nodes and interest prototype nodes to refine the item embedding vector and the interest prototype embedding vector. The bidirectional information propagation includes: forward propagation from item nodes to interest prototype nodes to aggregate the features of interactive items to interest prototypes; and backward propagation from interest prototype nodes to item nodes to transmit interest semantics back to item nodes. Attention scores between each item and each interest prototype are calculated based on an attention mechanism.
[0056] Based on the attention score, an associated interest prototype is determined for each item. Based on the associated interest prototype, the item embedding and interest prototype embedding are subjected to feature discriminative enhancement processing to obtain discriminative enhanced item embedding and interest prototype embedding.
[0057] A behavior-item sequence encoding layer is constructed. The refined item sequence embedding and interest sequence embedding are input into the item encoder and behavior encoder of the behavior-item sequence encoding layer, respectively. The item sequence and behavior sequence are interacted and fused through a cross-attention module to obtain the fused sequence. The embedding vector of the last time step is extracted from the fused sequence as the final user preference representation.
[0058] The similarity between the final user preference representation optimized through joint training and the candidate item embedding is calculated, and a Top-N recommendation list is generated and output based on the calculation results.
[0059] This invention distinguishes user behavior types in a multi-behavior sequence into target behaviors representing the final conversion intention and auxiliary behaviors representing intermediate interest tendencies. It constructs differentiated interest representation spaces for different behaviors, combines an information propagation mechanism based on a high-order association structure to achieve global information sharing under sparse interactive data, and integrates multi-dimensional supervision signals that combine item prediction, behavior prediction, and behavior-item mutual information constraints for joint optimization. This significantly improves recommendation accuracy, effectively solves the recommendation bias problem caused by ignoring the differences between multiple behaviors in existing methods, and demonstrates superior robustness and generalization ability in sparse interaction scenarios.
[0060] As one possible implementation method, the method specifically includes:
[0061] 1. Problems and Definitions
[0062] In this section, we will introduce the key definitions in the embodiments of the present invention.
[0063] We use , and Let each represent a set of users, items, and behaviors, respectively. , , This represents the number of users, items, and actions. We obtained the number of users. The most recent timestamp T of the behavior-aware interaction sequence ,in This indicates that at the t-th timestamp, user u... There is an item under the behavior. The interactive behavior. Furthermore, the items that user u interacts with under different behaviors are... ,in This represents the item that is interacted with under behavior k. Let M represent the interest embedding matrix for behavior k, where M represents the number of interests for each behavior.
[0064] We define the sequence recommendation task as follows: Input an interactive sequence Output: Predicted ranking score This indicates that user u purchased an item under the target behavior K. The probability of a candidate item being generated is considered, and the candidate items are sorted in descending order to form a Top-n recommended item list.
[0065] 2 Overall Architecture
[0066] Figure 4 The proposed MIBRec framework architecture is shown. The entire process can be divided into the following four layers:
[0067] 1. Behavior-aware embedding layer, including item encoding layer and interest encoding layer, encodes item and interest prototype embeddings;
[0068] 2. The behavior-aware multi-interest encoding layer uses a hypergraph Transformer neural network to learn item representations and multi-interest representations under different behaviors, and adopts multi-interest self-supervised contrastive learning to assist the task, maximizing the consistency between items and their associated interests;
[0069] 3. Behavior-item sequence encoding layer: The behavior-item Transformer is used to encode the item sequence and behavior sequence respectively, and a cross-attention module is used to learn their interaction.
[0070] 4. Behavior-aware training layer: Construct a behavior-aware constraint optimization framework, introduce behavior relevance constraints into the objective function of the multi-behavior recommendation system, and optimize recommendation performance.
[0071] 3. Behavior-aware embedding layer
[0072] (1) Item Embedded Encoding Layer
[0073] To better represent items by incorporating contextual information, the item embedding encoding layer integrates item attribute information, behavioral information, and temporal signals simultaneously. In this section, the Recformer model is used to learn feature representations of item attributes. This model encodes product attributes into natural language descriptions, replacing traditional product ID representations and thus better capturing rich semantic information. The Recformer model combines the embedding layer of a language model with a self-attention mechanism in a sequence recommendation model to learn the embedding of each word in the item attributes. First, all attribute text information of the item (such as title, color, brand) is transformed into key-value attribute pairs; different items can contain different attributes. Then, all key-value attribute pairs are flattened into an item "sentence." Finally, a pre-trained language model is used to learn the item feature representation of this item "sentence." This section inputs the text attributes of the item into the Recformer model. There are n attributes, which are used as input to a pre-trained language model, with a special marker [CLS] added to the beginning of the sequence. Therefore, the Recformer model can be formally represented as:
[0074]
[0075] Similar to language models used for sentence representation, product... Attribute embedding is represented as Therefore, for items We obtain the item embedding representation as shown below:
[0076]
[0077] in, d represents the embedding dimension. This represents element-wise addition. This indicates the embedding of behaviors that interact with the user. This represents learnable positional embeddings, which are widely used in sequence modeling. It captures the time-series information of different interactive objects. , and Let represent the item attribute embedding matrix, behavior embedding matrix, and position embedding matrix, respectively, and T represent the sequence length. For interaction sequences... We can obtain the item embedding matrix. .
[0078] (2) Multi-interest coding layer
[0079] Since different behaviors have their own semantics and contexts, the interests behind each behavior also have different semantics. We constructed an interest prototype embedding matrix for behavior k. M represents the number of interests under each behavior. This represents the i-th interest under behavior k, which will be used as a hyperedge of the hypergraph.
[0080] 4 Behavior-Aware Multi-Interest Encoder
[0081] Data sparsity hinders effective user-item interaction modeling, severely impacting the performance of existing graph-based collaborative filtering (CF) models in recommendation tasks. To address this issue, we employ a behavior-aware multi-interest encoder based on the Hypergraph Transformer. This encoder leverages the behavior-to-item information propagation mechanism to accurately capture users' diverse interests under different behaviors.
[0082] (1) The spread of goods to interests
[0083] We follow a Transformer-style multi-head attention mechanism, propagating behavior-aware information from item nodes to interest hyperedges under different behaviors to learn multi-interest representations for each behavior. The propagation process of behavior k from item nodes to interest hyperedges can be represented as follows:
[0084]
[0085]
[0086] in, The embedding of the interest superedge representing behavior k is obtained by... The connection was obtained. , and This represents the head projection matrix. To represent the adaptive sparsity operation and further explore the complex nonlinear feature interactions between hyperedges, two layers of hierarchical hypergraph neural networks were added to both the object and behavioral interest sides. The final hyperedge embedding representation was calculated in the following way:
[0087]
[0088] in, This represents a two-layer hypergraph network. , Represent the final and initial interest hyperedge embeddings, and represent all behavioral interest embeddings as... We utilize residual connections to enhance gradient propagation in the hypergraph neural structure. Furthermore, HHGN is configured with a learnable parameter matrix. It defines the relationship of interests, activation function. Used for nonlinear relationship modeling.
[0089] (2) The spread of interest to products
[0090] An interactive behavior may be underpinned by multiple interests, and this can be achieved by refining the interest hyperedge and obtaining... Subsequently, the MIBRec model further propagates information from the interest hyperedge to the item nodes, so as to fuse the interest hyperedge into an implicit representation of user interest reflected by interactive items, where the attention mechanism can measure the degree of influence of each item on the interest. The propagation process of behavior k from the interest hyperedge to the item nodes through a similar but reversed process can be represented as follows:
[0091]
[0092]
[0093] in Refined embedding of interactive items under behavior k, where all items are embedded as . , and This represents the query, key, and value projection matrix. It is an attention score matrix.
[0094] (3) Behavioral multi-interest self-supervised contrastive learning
[0095] This section describes how to enhance item and interest representations in the absence of supervised signals and sparse interaction data. After obtaining interest representations, the lack of true interest labels limits effective interest modeling. Therefore, we design a self-supervised contrastive learning approach for interests by maximizing the consistency between items and associated interests. Specifically, based on a computed attention score matrix, we define the interest with the highest score as the associated interest of the item. , Let represent the i-th interest under behavior k. We treat items and associated interests as positive sample pairs. This is paired with other interests as negative samples. In this way, our model learns discriminative representations by comparing positive and negative samples. The contrastive loss for InfoNCE is defined as:
[0096]
[0097] in, The cosine similarity function is represented by the multi-interest self-supervised contrastive loss, which is the sum of the losses of an item and its associated interest pairs for each action.
[0098]
[0099] 5. Behavior-Item Sequence Encoding Layer
[0100] To address the challenges of traditional methods in simultaneously processing heterogeneous item and behavior information, we employ an item-behavior Transformer that utilizes two distinct encoders to capture these two types of patterns (items and behaviors) and models their interaction using a cross-attention mechanism. Specifically, we first use... , Representing the sequence of items and the sequence of actions, respectively. This represents an element-wise addition operation. Then, the Item-Behavior Transformer uses two different encoders to encode the item sequence and behavior sequence respectively, and employs a cross-attention module to learn their interactions, which can be represented as follows:
[0101]
[0102]
[0103] in, This represents multiplication in terms of behavior, which means that items under different behaviors correspond to different mappings. , , This represents the query, keyword, and value projection matrix of the item encoder. , , This represents the query, keyword, and value projection matrix of the behavior encoder.
[0104] Finally, we obtain the item sequence embedding. ,Will We use the final user's preference to predict the next item. We estimate user u's preference for candidate items through inner product calculation, which can be calculated as follows:
[0105]
[0106] in Indicates user With candidate items The possibility of interaction Let i be the embedding representation of candidate item i.
[0107] 6. Behavioral perception training
[0108] Since different user behaviors essentially reflect different dimensions of user interests, their interaction patterns exhibit significant heterogeneity and complexity. For example, clicking behavior may reflect short-term interests, while purchasing behavior reflects long-term preferences. To model this multi-behavioral characteristic, we propose a behavior-aware optimization framework that incorporates behavioral constraints into a multi-behavioral recommendation objective function. This objective function is divided into three parts: the first objective function aims to discover patterns of user interest change, the second aims to reveal patterns of user behavior change, and the third aims to capture the correlation between interest change patterns and behavior change patterns. For the first two terms, we construct a cross-entropy function for optimization. For the third term, MIBRec maximizes the cross-entropy function through InfoNCE. and Based on the mutual information terms between them, we formally define our loss as follows:
[0109] 1) Predicting the next interactive item:
[0110]
[0111] in, This represents the embedding of the target item obtained by the item-behavior transformer. This indicates the embedding of a real target item.
[0112] 2) The task of predicting the next interaction behavior:
[0113]
[0114] Among them, embedding the behavior sequence of user u interaction , This represents the embedding of the hypothetical target behavior obtained from the item-behavior transformer. Embeddings representing the actual target behavior.
[0115] 3) Mutual information loss function:
[0116]
[0117] We use items and their corresponding behaviors as positive sample pairs. This is used as a negative sample pair with other behaviors. Here, S represents all interaction sequences in the same batch. The learning objective of the behavior-aware training task is... , and Finally, MIBRec jointly optimizes two key objectives: (1) the behavioral multi-interest self-supervised contrastive task and (2) the behavioral awareness training task. Our final joint loss function is formally defined as:
[0118]
[0119] in, , , This is an adjustable hyperparameter used to balance the importance of each loss.
[0120] 7. Experiment
[0121] 7.1 Experimental Setup
[0122] 7.1.1 Data
[0123] To evaluate the performance of MIBRec, we conducted experiments on three real public datasets: Yelp, IJCAI, and Taotao. The statistics for the evaluation datasets are listed in Table 1.
[0124] Yelp is a commonly used dataset containing user ratings collected from commercial locations, including attribute information of interactive items. Based on explicit user ratings (from 1 (worst) to 5 (best)), user interactions are categorized into three types: dislike (rating ≤ 2), neutral (2 < rating < 4), and like (rating ≥ 4). In this invention, we consider "like" to be the target behavior.
[0125] IJCAI: This dataset is a user activity modeling competition dataset released by an online e-commerce platform, including four behaviors: Click, Favorite, Add to Cart, and Purchase. We consider Purchase as the target behavior in the IJCAI dataset.
[0126] Taobao: This is a recommendation dataset provided by the Taobao platform. It contains various user interaction types and product attribute information. User behaviors are categorized into four types: click, favorite, add to cart, and purchase. We consider purchase as the target behavior.
[0127] Table 1 Statistical Results of the Dataset
[0128]
[0129] 7.1.2 Assessment
[0130] To ensure the fairness of the evaluation and to facilitate comparison with existing methods, we adopted two common Top-K recommended performance metrics during the performance evaluation phase: HR@K and NDCG@K, where K=10.
[0131] 7.1.3 Baseline Model
[0132] To fully verify the recommendation performance of MIBRec, this embodiment of the invention selected two baseline algorithms, multi-behavior recommendation model and multi-interest recommendation model, for comparative experiments.
[0133] (1) Multi-behavior recommendation model
[0134] MBHT (Y. Yang, C. Huang, L. Xia, Y. Liang, Y. Yu, and C. Li, “Multi-behavior hypergraph-enhanced transformer for sequential recommendation,” in Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and DataMining, Aug. 2022, pp. 2263–2274. doi: 10.1145 / 3534678.3539342.): This method utilizes an item semantic dependency hypergraph and an item multi-behavior dependency hypergraph to obtain a representation with global multi-behavior information.
[0135] MB-STR (E. Yuan, W. Guo, Z. He, H. Guo, C. Liu, and R. Tang, “Multi-behavior sequential transformer recommender,” in Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, Madrid, Spain: ACM, July 2022, pp. 1642–1652. doi: 10.1145 / 3477495.3532023.): This method designs a multi-behavior Transformer layer to capture fine-grained multi-behavior dependencies and models different multi-behavior sequence models through a multi-behavior sequence pattern generator.
[0136] MB-GMN (C. Shang, Y. Hou, WX Zhao, Y. Li, and J. Zhang, “Multi-grained hypergraph interest modeling for conversational recommendation,” AIOpen, vol. 4, pp. 154–164, 2023, doi: 10.1016 / j.aiopen.2023.10.001.): This method is a recommendation approach capable of extracting user and product features from complex multi-behavioral data. The model combines meta-learning with graph neural networks, employing a graph meta-network to capture meta-knowledge of users, products, and behavioral categories, thereby capturing behavior-based user and product feature information for accurate recommendations.
[0137] LightGCNM (X. He, K. Deng, X. Wang, Y. Li, Y. Zhang, and M. Wang, “LightGCN: Simplifying and powering graph convolution network for recommendation,” in Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, VirtualEvent China: ACM, July 2020, pp. 639–648. doi: 10.1145 / 3397271.3401063.): This method enhances LightGCN by replacing the original single-behavior graph with a multi-behavior graph, which then utilizes a simplified GCN model for recommendation.
[0138] (2) Multi-interest recommendation model
[0139] SINE (Q. Tan et al., “Sparse-interest network for sequential recommendation,” Feb. 18, 2021, arXiv: arXiv:2102.09267. doi: 10.48550 / arXiv.2102.09267.): This method includes a sparse interest module that infers a sparse set of concepts from a large-scale concept pool; and an interest aggregation module that predicts the user’s current interests and makes recommendations.
[0140] ComiRec-DR (Y. Cen, J. Zhang, X. Zou, C. Zhou, H. Yang, and J. Tang, “Controllable multi-interest framework for recommendation,” Aug. 03, 2020, arXiv: arXiv:2005.09347. doi: 10.48550 / arXiv.2005.09347.): ComiRec is a multi-interest framework designed to extract multiple interest representations from sequences of user behavior, thereby better capturing the diverse interests of users. This version is similar to ComiRec-SA, but uses CapsNet for interest extraction.
[0141] ComiRec-SA (Y. Cen, J. Zhang, X. Zou, C. Zhou, H. Yang, and J. Tang, “Controllable multi-interest framework for recommendation,” Aug. 03, 2020, arXiv: arXiv:2005.09347. doi: 10.48550 / arXiv.2005.09347.): It is a multi-interest model that includes a self-attention-based multi-interest capture module and a candidate aggregation module for balancing recommendation diversity and accuracy.
[0142] MISSL (B. Wu, Y. Cheng, H. Yuan, and Q. Ma, “When multi-behavior meets multi-interest: Multi-behavior sequential recommendation with multi-interest self-supervised learning,” in 2024 IEEE 40th International Conference on DataEngineering (ICDE), Utrecht, Netherlands: IEEE, May 2024, pp. 845–858. doi:10.1109 / ICDE60146.2024.00070.): This method precisely combines multiple behaviors and multiple interests into a unified model to obtain a more comprehensive and accurate user embedding representation.
[0143] 7.1.4 Hyperparameter Settings
[0144] For all models, unless explicitly stated in the literature, this experiment used the Adam optimizer and stochastic gradient descent strategy for model optimization and training. The learning rate for the Adam optimizer was set to 0.001. Furthermore, we fixed the maximum sequence length to 50 and the deceleration rate t to 6. To ensure fair comparison, we set the embedding dimension of both the model and the baseline method to 16. For the comparison method, we first initialized the baseline algorithm using the parameters from the literature, and then fine-tuned the parameters based on the dataset and optimization strategy.
[0145] 7.2 Experimental Results
[0146] 7.2.1 Performance Experiment
[0147] Table 2. Comparison of recommendation performance of our method and baseline algorithm on HR@10 and NDCG@10 metrics.
[0148]
[0149] (1) As shown in Table 2 (best and second-best results are indicated by bold and underline, respectively), the MIBRec method proposed in this invention achieves excellent performance on all three datasets, surpassing the existing best baseline model, with improvements of up to 3.22% and 1.96% on the HR@10 and NDCG@10 evaluation metrics, respectively. The performance improvement can be attributed to: i) enhancing the item embedding representation by combining item attribute information, providing richer semantic features for the recommendation task; ii) effectively alleviating the sparsity of user historical behavior data through hypergraph neural networks, achieving fine-grained representation of complex user interests and items; iii) accurately learning interest representations through multi-interest self-supervised contrastive learning, enhancing the feature representation of items and interests.
[0150] (2) MIBRec outperforms both multi-behavior and multi-interest recommendation methods (such as MBHT and ComiRec), demonstrating the necessity of capturing the differences in user interests behind different behavior types (such as clicks, favorites, and purchases). By performing fine-grained interest modeling on different behaviors, MIBRec can more comprehensively understand the diverse needs of users.
[0151] (3) The performance improvement of the IJCAI dataset is more significant compared to the Yelp and Taobao datasets. This can be attributed to the higher data density and richness of user-item interactions in the IJCAI dataset, which enables the model to capture dynamic interest changes more effectively, thereby improving recommendation accuracy and model robustness.
[0152] 7.2.2 Ablation Experiment
[0153] To verify the effectiveness of the proposed method, we removed three main modules of MIBRec: the product attribute encoder, the multi-interest self-supervised contrastive learning, and the behavior training task. This invention was retrained and evaluated on these ablation variants on the Yelp and IJCAI datasets, with results as follows: Figure 5 , Figure 6 As shown. Our analysis yielded the following key observations:
[0154] (1) Ablation experiments showed that removing the product attribute encoder (MIBRec-) Recfor This leads to a significant drop in the performance of the MIBRec model. This phenomenon indicates that by incorporating attributes such as brand and category, the item embeddings contain richer semantic information. Without these attributes, the NDCG@10 metric decreases by 0.48% and HR@10 by 0.69% on the Yelp dataset, and by 3.99% and HR@10 by 1.09% on the IJCAI dataset. The model cannot fully exploit the multi-dimensional features of items, resulting in a decline in recommendation performance.
[0155] (2) Ablation experiments show that removing the multi-interest self-supervised contrastive learning module (MIBRec-) Contrast This resulted in a significant decline in recommendation performance, specifically a 3.49% decrease in NDCG@10 and a 14.58% decrease in HR@10 on the Yelp dataset, and a 4.14% decrease in NDCG@10 and a 15.4% decrease in HR@10 on the IJCAI dataset. This phenomenon indicates that the role of multi-interest self-supervised contrastive learning in the model is indispensable. Without the multi-interest self-supervised contrastive learning module, the model cannot fully explore the fine-grained interests in user behavior, leading to insufficient accuracy in the recommendation system's identification of user preferences.
[0156] (3) Ablation experiments showed that removing the Behavior-Aware Training Task module (MIBRec- Training Recommendation performance also showed a significant decline, specifically a 1.47% decrease in NDCG@10 and a 3.17% decrease in HR@10 on the Yelp dataset, and a 1.96% decrease in NDCG@10 and a 6.54% decrease in HR@10 on the IJCAI dataset. This phenomenon indicates that behavioral relevance constraints play a crucial role in multi-behavioral recommendation systems. The lack of this constraint can lead to biases in the understanding of user interests, thus affecting the quality of recommendation results.
[0157] 7.2.3 Hyperparameter Sensitivity Analysis
[0158] To investigate the impact of the number of interests M for each behavior on model performance, we performed a hyperparameter sensitivity analysis on the Yelp dataset. Specifically, we set the number of interests M for each behavior to {4, 10, 16, 50, 64} and recorded the performance changes of the model on two metrics: HR@10 and NDCG@10.
[0159] Experimental results are as follows Figure 7 As shown. From Figure 7 As can be observed, both HR@10 and NDCG@10 show a steady upward trend as M increases from 4 to 50. The model achieves its best performance when M=50 (HR@10 reaches approximately 0.880, and NDCG@10 reaches approximately 0.622). However, when M further increases to 64, both indicators show a significant decrease.
[0160] This indicates that, given the current dataset and model structure, setting the number of interest prototypes for each behavior to around 50 is most suitable. If the number is too small (e.g., M=4), the model will struggle to fully capture the diverse interest distributions of users across different behaviors, while setting it too large (e.g., M=64) may result in overly fine interest granularity, introducing redundant noise or causing excessive feature segmentation, thereby impairing recommendation performance.
[0161] In summary, this invention proposes a multi-behavior sequence recommendation method based on multi-interest self-supervised learning. Specifically, we first provide the model with rich item features through embeddings learned by the item attribute encoder, enhancing the semantic information of item representations. Second, using a hypergraph Transformer network and a behavior-aware multi-interest encoder, the model accurately captures multi-interest representations under different behaviors. Simultaneously, we employ multi-interest self-supervised contrastive learning to assist the task, enhancing the feature representations of items and interests. Next, we use an Item-Behavior Transformer to encode item sequences and behavior sequences separately, and employ a cross-attention module to learn their interactions. Finally, we propose a behavior-aware constraint optimization framework that incorporates behavior relevance constraints into the objective function of the multi-behavior recommendation system, optimizing recommendation performance. Experimental results show that the proposed method significantly outperforms traditional baseline methods on three datasets, demonstrating the effectiveness of considering the differences in various user behaviors in improving recommendation system performance.
[0162] like Figure 8 As shown, this invention also proposes a multi-behavior sequence recommendation system based on multi-interest self-supervised learning, comprising:
[0163] A multi-behavior data acquisition unit is used to acquire multi-behavior interaction sequence data of users, wherein the interaction sequence data includes timestamps of user-item interaction, item identification, and corresponding behavior types.
[0164] The initial embedding learning unit is used to construct the behavior-aware embedding layer. It encodes each item in the interaction sequence data into an initial item embedding vector that integrates item attribute semantics, behavior semantics and temporal location information, and initializes a set of learnable interest prototype embedding vectors for each behavior type.
[0165] A bidirectional information propagation unit is used to construct a behavior-aware multi-interest encoder. Based on a hypergraph Transformer network, it performs bidirectional information propagation between item nodes and interest prototype nodes to refine item embedding vectors and interest prototype embedding vectors. The bidirectional information propagation includes: forward propagation from item nodes to interest prototype nodes to aggregate the features of interactive items to interest prototypes; and backward propagation from interest prototype nodes to item nodes to transmit interest semantics back to item nodes. Attention scores between each item and each interest prototype are calculated based on an attention mechanism.
[0166] The interest self-supervised learning unit is used to introduce multi-interest self-supervised contrastive learning to assist tasks. Based on the attention score, it determines the associated interest prototype for each item, forms positive sample pairs with the item and its associated interest prototype, and forms negative sample pairs with the item and other interest prototypes. The contrastive learning loss function is used to bring the positive sample pairs closer and push the negative sample pairs further apart, so as to enhance the feature discriminativeness of item embedding and interest prototype embedding.
[0167] The sequence feature learning unit is used to construct the behavior-item sequence encoding layer. The refined item sequence embedding and interest sequence embedding are input into the item encoder and behavior encoder of the behavior-item sequence encoding layer, respectively. The item sequence and behavior sequence are interacted and fused through the cross attention module to obtain the fused sequence. The embedding vector of the last time step is extracted from the fused sequence as the final user preference representation.
[0168] A joint optimization training unit is used to construct a behavior-aware training optimization framework, and a joint loss function is defined, which includes the contrastive learning loss; the model parameters are jointly optimized and trained by minimizing the joint loss function.
[0169] The recommendation unit is used to calculate the similarity between the trained end-user preference representation and the candidate item embedding, and generate and output a Top-N recommendation list based on the calculation results.
[0170] The specific functions of each unit can be found in the steps of a multi-behavior sequence recommendation method based on multi-interest self-supervised learning, which will not be elaborated here.
[0171] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A multi-behavior sequence recommendation method based on multi-interest self-supervised learning, characterized in that, include: Acquire multi-behavioral interaction sequence data of the user, the interaction sequence data including the timestamp of the user's interaction with the item, the item's identity identifier, and the corresponding behavior type; Construct a behavior-aware embedding layer, encode each item in the interaction sequence data into an initial item embedding vector that integrates item attribute semantics, behavior semantics and temporal location information, and initialize a set of learnable interest prototype embedding vectors for each behavior type. A behavior-aware multi-interest encoder is constructed based on a hypergraph Transformer network. Bidirectional information propagation is performed between item nodes and interest prototype nodes to refine the item embedding vector and the interest prototype embedding vector. The bidirectional information propagation includes: forward propagation from item nodes to interest prototype nodes to aggregate the features of interactive items to interest prototypes; and backward propagation from interest prototype nodes to item nodes to transmit interest semantics back to item nodes. Attention scores between each item and each interest prototype are calculated based on an attention mechanism. A multi-interest self-supervised contrastive learning auxiliary task is introduced. Based on the attention score, an associated interest prototype is determined for each item. The item and its associated interest prototype are formed into positive sample pairs, and the item and other interest prototypes are formed into negative sample pairs. The contrastive learning loss function is used to bring the positive sample pairs closer and push the negative sample pairs further apart, so as to enhance the feature discriminativeness of item embedding and interest prototype embedding. A behavior-item sequence encoding layer is constructed. The refined item sequence embedding and interest sequence embedding are input into the item encoder and behavior encoder of the behavior-item sequence encoding layer, respectively. The item sequence and behavior sequence are interacted and fused through a cross-attention module to obtain the fused sequence. The embedding vector of the last time step is extracted from the fused sequence as the final user preference representation. A training optimization framework for behavior awareness is constructed, and a joint loss function is defined, which includes the contrastive learning loss; the model parameters are jointly optimized and trained by minimizing the joint loss function. The similarity between the trained end-user preference representation and the candidate item embedding is calculated, and a Top-N recommendation list is generated and output based on the calculation results.
2. The multi-behavior sequence recommendation method based on multi-interest self-supervised learning according to claim 1, characterized in that, Encoding each item in the interaction sequence data into an initial item embedding vector that integrates item attribute semantics, behavioral semantics, and temporal location information specifically includes: All attribute text information of an item is converted into key-value attribute pairs, and all key-value attribute pairs are flattened into an item sentence; a marker [CLS] is added to the beginning of the item sentence sequence; the item sentence with the added marker is input into a pre-trained Recformer model, and the output vector at the position corresponding to the marker [CLS] is extracted as the attribute semantic embedding vector of the item.
3. The multi-behavior sequence recommendation method based on multi-interest self-supervised learning according to claim 1, characterized in that, The forward propagation from the item node to the interest prototype node and the backward propagation from the interest prototype node to the item node are both calculated using a Transformer-style multi-head attention mechanism. In the backward propagation, the attention score matrix between each item node and each interest prototype node is calculated by scaling dot product attention, and this attention score matrix is used as the basis for determining the associated interest prototype.
4. The multi-behavior sequence recommendation method based on multi-interest self-supervised learning according to claim 1, characterized in that, The behavior-aware multi-interest encoder is also configured with a hierarchical hypergraph neural network, which contains a two-layer network structure for mining nonlinear feature interactions between interest hyperedges; and residual connections are introduced during the bidirectional information propagation process to enhance the gradient propagation effect.
5. The multi-behavior sequence recommendation method based on multi-interest self-supervised learning according to claim 1, characterized in that, The contrastive learning loss function adopts the InfoNCE loss function, which calculates the similarity between item embeddings and interest prototype embeddings based on the cosine similarity function. Furthermore, the multi-interest self-supervised contrastive learning auxiliary task calculates the sum of the contrastive losses of all items and their associated interests under each behavior type as the global self-supervised loss.
6. The multi-behavior sequence recommendation method based on multi-interest self-supervised learning according to claim 1, characterized in that, The cross-attention module specifically performs the following bidirectional interactive operations: Using behavior sequence embeddings as queries and item sequence embeddings as keys and values, the first cross-attention output is calculated to achieve attention to item features from a behavior perspective; Using item sequence embeddings as queries and behavior sequence embeddings as keys and values, a second cross-attention output is calculated to achieve attention to behavioral features from the perspective of items; The first cross-attention output and the second cross-attention output are used as the fused sequence.
7. The multi-behavior sequence recommendation method based on multi-interest self-supervised learning according to claim 1, characterized in that, The joint loss also includes item prediction loss for predicting the next interactive item, behavior prediction loss for predicting the next interactive behavior type, and mutual information loss for maximizing the mutual information between the current item prediction result and the actual behavior representation.
8. The multi-behavior sequence recommendation method based on multi-interest self-supervised learning according to claim 7, characterized in that, Both the item prediction loss and the behavior prediction loss are constructed based on the cross-entropy loss function, and are used to supervise the prediction of the interactive items and interactive behavior types in the next time step, respectively.
9. The multi-behavior sequence recommendation method based on multi-interest self-supervised learning according to any one of claims 1-8, characterized in that, The behavior types include target behaviors and auxiliary behaviors. The target behaviors are interactive behaviors used to characterize the user's final conversion intention, and the auxiliary behaviors are interactive behaviors used to characterize the user's intermediate interest tendencies.
10. A multi-behavior sequence recommendation system based on multi-interest self-supervised learning, characterized in that, include: A multi-behavior data acquisition unit is used to acquire multi-behavior interaction sequence data of users, wherein the interaction sequence data includes timestamps of user-item interaction, item identification, and corresponding behavior types. The initial embedding learning unit is used to construct the behavior-aware embedding layer. It encodes each item in the interaction sequence data into an initial item embedding vector that integrates item attribute semantics, behavior semantics and temporal location information, and initializes a set of learnable interest prototype embedding vectors for each behavior type. A bidirectional information propagation unit is used to construct a behavior-aware multi-interest encoder. Based on a hypergraph Transformer network, it performs bidirectional information propagation between item nodes and interest prototype nodes to refine item embedding vectors and interest prototype embedding vectors. The bidirectional information propagation includes: forward propagation from item nodes to interest prototype nodes to aggregate the features of interactive items to interest prototypes; and backward propagation from interest prototype nodes to item nodes to transmit interest semantics back to item nodes. Attention scores between each item and each interest prototype are calculated based on an attention mechanism. The interest self-supervised learning unit is used to introduce multi-interest self-supervised contrastive learning to assist tasks. Based on the attention score, it determines the associated interest prototype for each item, forms positive sample pairs with the item and its associated interest prototype, and forms negative sample pairs with the item and other interest prototypes. The contrastive learning loss function is used to bring the positive sample pairs closer and push the negative sample pairs further apart, so as to enhance the feature discriminativeness of item embedding and interest prototype embedding. The sequence feature learning unit is used to construct the behavior-item sequence encoding layer. The refined item sequence embedding and interest sequence embedding are input into the item encoder and behavior encoder of the behavior-item sequence encoding layer, respectively. The item sequence and behavior sequence are interacted and fused through the cross attention module to obtain the fused sequence. The embedding vector of the last time step is extracted from the fused sequence as the final user preference representation. A joint optimization training unit is used to construct a behavior-aware training optimization framework, and defines a joint loss function, which includes the contrastive learning loss; the model parameters are jointly optimized and trained by minimizing the joint loss function. The recommendation unit is used to calculate the similarity between the trained end-user preference representation and the candidate item embedding, and generate and output a Top-N recommendation list based on the calculation results.