Explainable sequence recommendation method, system, and apparatus that fuse concepts and behaviors

By constructing a strategy to associate concepts and behaviors, a concept weight matrix and a set of behavior sequences are generated, which solves the problem in existing technologies that it is difficult to integrate coarse-grained concepts with fine-grained user behaviors, and achieves more accurate and interpretable sequence recommendation results.

CN119831028BActive Publication Date: 2025-11-18SHANTOU UNIV

Patent Information

Application Number
CN202411636402.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-11-18
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

Existing sequence recommendation technologies struggle to effectively integrate coarse-grained concepts with fine-grained user behavior, making it difficult to dynamically capture changes in user preferences and affecting the accuracy and interpretability of recommendation results.

Method used

By acquiring a concept library and user historical behavior sequences, a historical concept sequence and a concept embedding matrix are constructed. Combining the association strategy between concepts and behaviors, a concept weight matrix and a set of behavior sequences are generated. An interpretable recommendation model is then used to perform sequence recommendations, providing dynamic and interpretable recommendation results.

Benefits of technology

It improves the accuracy and interpretability of sequence recommendation results, can dynamically adapt to changes in user behavior, and enhances the transparency and credibility of recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831028B_ABST
    Figure CN119831028B_ABST
Patent Text Reader

Abstract

The application provides an explainable sequence recommendation method, system and device fusing concepts and behaviors, relates to the technical field of recommendation systems, and the method comprises the following steps: obtaining a concept library and a historical behavior sequence of a user; obtaining a historical concept sequence and a concept embedding matrix according to the historical behavior sequence and the concept library; obtaining a concept weight matrix and a concept behavior sequence set according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix in combination with an association strategy of concepts and behaviors; and performing sequence recommendation on the user according to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set to obtain an explainable sequence recommendation result. By introducing the association strategy of concepts and behaviors, the application not only effectively fuses abstract concept information and specific behavior information, but also dynamically adjusts the understanding and explanation of user preferences through the concept embedding matrix and the concept weight matrix, thereby improving the accuracy and explainability of the sequence recommendation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of recommender system technology, and in particular to interpretable sequence recommendation methods, systems and apparatus that integrate concepts and behaviors. Background Technology

[0002] Sequential recommendation is a recommender system technique that predicts and recommends the next item a user might be interested in based on their historical behavior sequence. Sequential recommendation methods consider the continuous actions of users and the temporal order between these actions, thus capturing dynamic changes in user preferences. Related sequential recommendation techniques, such as counterfactual explanation models, provide users with diverse recommendations and explanations through partial behavior substitution, improving the transparency and credibility of the recommendation model. However, these techniques still cannot well solve the integration problem between coarse-grained concepts and fine-grained user behavior. When user behavior changes, these techniques struggle to dynamically capture the conceptual meaning behind these changes, thus making it difficult to provide convincing and interpretable sequential recommendation results, limiting the improvement of the accuracy of sequential recommendation results. Summary of the Invention

[0003] The purpose of this application is to at least partially solve one of the technical problems existing in the prior art.

[0004] Therefore, the purpose of this application is to provide an interpretable sequence recommendation method, system, and apparatus that integrates concepts and behaviors for sequence recommendation and to provide interpretable sequence recommendation results.

[0005] To achieve the above-mentioned technical objectives, the technical solutions adopted in the embodiments of this application include:

[0006] On the one hand, embodiments of this application provide an interpretable sequence recommendation method that integrates concepts and behaviors, including the following steps:

[0007] Obtain a concept library and the user's historical behavior sequence; the concept library is a collection of all possible concepts;

[0008] Based on the historical behavior sequence and the concept library, a historical concept sequence and a concept embedding matrix are obtained; the historical concept sequence is a sequence of concepts corresponding to items related to the user's historical behavior sequence; the concept embedding matrix is ​​used to represent the feature vectors of all concepts in the concept library.

[0009] Based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, and combined with the concept and behavior association strategy, a concept weight matrix and a concept behavior sequence set are obtained; the concept and behavior association strategy is used to obtain the relationship between the historical behavior sequence and the historical concept sequence.

[0010] Based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix, and the concept behavior sequence set, sequence recommendations are made for the user to obtain interpretable sequence recommendation results.

[0011] Further, the concept behavior sequence set includes a first behavior sequence, a second behavior sequence, a first concept behavior sequence, and a second concept behavior sequence; the step of obtaining the concept weight matrix and the concept behavior sequence set based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the association strategy between concepts and behaviors, includes:

[0012] Based on the historical behavior sequence, the first behavior sequence and the second behavior sequence are obtained;

[0013] Based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, and combined with the association strategy between the concept and the behavior, the concept weight matrix, the first concept behavior sequence, and the second concept behavior sequence are obtained.

[0014] Further, obtaining the first behavior sequence and the second behavior sequence based on the historical behavior sequence includes:

[0015] Based on the historical behavior sequence, combined with the positive sample sampling processing method, the first behavior sequence is obtained;

[0016] The historical behavior sequence is subjected to counterfactual transformation to obtain the second behavior sequence.

[0017] Further, the step of obtaining the concept weight matrix, the first concept behavior sequence, and the second concept behavior sequence based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the concept and behavior association strategy, includes:

[0018] Based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, and combined with the association strategy between the concepts and behaviors, the concept weight matrix is ​​obtained; the concept weight matrix is ​​used to measure the contribution of each concept in the historical concept sequence to its related behaviors.

[0019] The first concept behavior sequence and the second concept behavior sequence are obtained based on the historical behavior sequence, the concept embedding matrix, and the concept weight matrix.

[0020] Further, obtaining the first concept behavior sequence and the second concept behavior sequence based on the historical behavior sequence, the concept embedding matrix, and the concept weight matrix includes:

[0021] The product of the concept weight matrix and the concept embedding matrix is ​​added to the historical behavior sequence to obtain the first concept behavior sequence;

[0022] The first concept behavior sequence is masked to obtain the second concept behavior sequence.

[0023] Further, the step of performing sequence recommendations for the user based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix, and the concept behavior sequence set to obtain an interpretable sequence recommendation result includes:

[0024] Based on the historical behavior sequence and the concept behavior sequence set, an interpretable recommendation model is used to obtain a sequence recommendation result set;

[0025] Based on the sequence recommendation result set, the historical behavior sequence, the concept behavior sequence set, the concept embedding matrix, and the concept weight matrix, the interpretable sequence recommendation result is obtained using the interpretable recommendation model.

[0026] Further, the step of obtaining a sequence recommendation result set based on the historical behavior sequence and the concept behavior sequence set using an interpretable recommendation model includes:

[0027] Based on the historical behavior sequence, the first sequence recommendation result is obtained using the interpretable recommendation model;

[0028] Based on the first behavior sequence of the concept behavior sequence set, the second sequence recommendation result is obtained using the interpretable recommendation model;

[0029] Based on the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence of the concept behavior sequence set, the third sequence recommendation result is obtained using the interpretable recommendation model;

[0030] Based on the first concept behavior sequence of the concept behavior sequence set, the fourth sequence recommendation result is obtained using the interpretable recommendation model;

[0031] Based on the second concept behavior sequence of the concept behavior sequence set, the fifth sequence recommendation result is obtained using the interpretable recommendation model;

[0032] The first sequence recommendation result, the second sequence recommendation result, the third sequence recommendation result, the fourth sequence recommendation result, and the fifth sequence recommendation result are used as the sequence recommendation result set.

[0033] Furthermore, the explainable recommendation model includes a counterfactual explanation model; the optimization method for the counterfactual explanation model includes a contrastive learning method.

[0034] On the other hand, embodiments of this application provide an interpretable sequence recommendation system that integrates concepts and behaviors, including:

[0035] The data acquisition module is used to acquire the concept library and the user's historical behavior sequences;

[0036] The concept embedding module is used to obtain a historical concept sequence and a concept embedding matrix based on the historical behavior sequence and the concept library;

[0037] The concept and behavior association module is used to obtain a concept weight matrix and a concept behavior sequence set based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the concept and behavior association strategy.

[0038] An interpretable sequence recommendation module is used to perform sequence recommendations for the user based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix, and the concept behavior sequence set, to obtain an interpretable sequence recommendation result.

[0039] On another front, embodiments of this application provide an interpretable sequence recommendation apparatus that integrates concepts and behaviors, including:

[0040] At least one processor;

[0041] At least one memory for storing at least one program;

[0042] When the at least one program is executed by the at least one processor, the at least one processor implements the interpretable sequence recommendation method that integrates concepts and behaviors as described in any one of claims 1 to 8.

[0043] The beneficial effects of this application are as follows: This application provides an interpretable sequence recommendation method, system, and apparatus that integrates concepts and behaviors. First, a concept library and the user's historical behavior sequences are obtained. Second, based on the historical behavior sequences and the concept library, a historical concept sequence and a concept embedding matrix are obtained. Third, based on the historical behavior sequences, the historical concept sequences, and the concept embedding matrix, and combined with a concept-behavior association strategy, a concept weight matrix and a concept-behavior sequence set are obtained. Finally, based on the historical behavior sequences, the concept embedding matrix, the concept weight matrix, and the concept-behavior sequence set, sequence recommendations are performed on the user to obtain an interpretable sequence recommendation result. This application, by introducing a concept-behavior association strategy, not only effectively integrates abstract conceptual information with specific user behaviors, but also dynamically adjusts the understanding and interpretation of user preferences through the concept embedding matrix and concept weight matrix, thereby improving the accuracy and interpretability of the sequence recommendation results.

[0044] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0045] Figure 1 This is a flowchart of the interpretable sequence recommendation method that integrates concepts and behaviors provided in this application;

[0046] Figure 2 This is a flowchart provided in this application for determining the first line sequence and the second line sequence;

[0047] Figure 3 This is a flowchart of the concept weight matrix, the first concept behavior sequence, and the second concept behavior sequence provided in this application;

[0048] Figure 4 This is a structural diagram of an interpretable sequence recommendation system that integrates concepts and behaviors, provided by the system itself.

[0049] Figure 5 This is a comparison chart of concept scores for SalExpl, CauseRec, and 3Ce4Sr on the Sports dataset provided in this application;

[0050] Figure 6 This is a comparison chart of concept scores for SalExpl, CauseRec, and 3Ce4Sr on the Clothing dataset provided in this application;

[0051] Figure 7 This is a comparison chart of the fidelity of RndExpl, SalExpl, CauseRec, and 3Ce4Sr on four public datasets provided in this application;

[0052] Figure 8 This is a stability comparison chart of RndExpl, SalExpl, CauseRec, and 3Ce4Sr provided in this application on four public datasets. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] The present application will be further described below with reference to the accompanying drawings and specific embodiments. The described embodiments should not be considered as limitations on the present application, and all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present application.

[0055] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0057] Recommender systems are information filtering technologies designed to help users discover potentially interesting content from a large number of options. They are widely used in e-commerce, social media, news and information, and other fields to improve user experience and promote business conversion through personalized recommendations. Sequence recommendation, as a special form of recommender system, pays particular attention to the temporal order of user behavior, using the user's historical behavior sequence to predict their future behavior or interests. This makes recommendations closer to the user's real-time needs, enhancing the relevance and timeliness of the recommendations.

[0058] Traditional sequential recommendation methods typically rely on users' past behavioral sequences, employing models such as recurrent neural networks, long short-term memory networks, or attention mechanisms to capture temporal dependencies. These models can learn user behavior patterns and make future recommendations accordingly. However, these methods often lack interpretability, meaning users find it difficult to understand why specific items are recommended.

[0059] In recent years, to improve the transparency and credibility of recommender systems, researchers have introduced interpretable models, such as counterfactual explanation models. Counterfactual explanation models generate different recommendation results by partially replacing certain actions in a user's historical behavior, thus providing diverse explanations for recommendations. For example, if a user does not purchase a certain item, the system can show the possible changes in recommendations if the user had purchased the item, thereby explaining the reason for the current recommendation.

[0060] Existing counterfactual explanation models mainly fall into the following categories: Action-based counterfactual explanation models directly use user behavior as the basis for explanation. While intuitive, they only reflect past preferences and cannot adapt to dynamic changes in preferences. Layer-based counterfactual explanation models attempt to understand user behavior at a higher level, but struggle to achieve universality when extracting product-level features. Attribute-based counterfactual explanation models utilize knowledge graphs to provide rich information, but suffer from high computational complexity due to the high overhead of graph search.

[0061] To address the challenges of existing interpretable models in integrating coarse-grained concepts with fine-grained user behavior, lacking high-level understanding when interpreting user behavior or related features, and failing to effectively handle changes in user behavior over time, this application provides an interpretable sequence recommendation method and system that integrates concepts and behaviors. By introducing association strategies between concepts and behaviors, multi-level and multi-dimensional connections are established between a user's historical concept sequences and historical behavior sequences. Combining concept embedding matrices and concept weight matrices, the sequence recommendation system can not only understand user preferences at a higher level but also dynamically adapt to changes in user behavior, thereby improving the accuracy and interpretability of sequence recommendation results, and ultimately enabling users to better understand the reasons behind the sequence recommendations.

[0062] The implementation steps of an interpretable sequence recommendation method that integrates concepts and behaviors, provided in the embodiments of this application, will be described in detail below with reference to the accompanying drawings.

[0063] The interpretable sequence recommendation method that integrates concepts and behaviors proposed in this application can be applied to terminals, servers, or software running on either terminal or server. Terminals can be tablets, laptops, desktop computers, etc., but are not limited to these. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms.

[0064] Reference Figure 1 , Figure 1 The flowchart illustrates the method for recommending interpretable sequences that integrates concepts and behaviors provided in this application. The method for recommending interpretable sequences that integrates concepts and behaviors provided in the embodiments of this application may include, but is not limited to, the following steps.

[0065] S101, obtain the concept library and the user's historical behavior sequence.

[0066] It's important to note that historical behavior sequences refer to a user's past series of interactions, such as watching movies or purchasing goods. These behaviors are arranged chronologically, reflecting the user's dynamic preferences. The concept library contains all possible concepts, which are predefined and cover a wide range of categories, such as genre, theme, and emotion.

[0067] In this step, user behavior data and concept library information are collected to provide foundational data for the subsequent recommendation process.

[0068] S102, based on the historical behavior sequence and concept library, obtain the historical concept sequence and concept embedding matrix.

[0069] It's important to note that the historical concept sequence refers to the set of concepts associated with a user's historical behavior. Each behavior can be associated with one or more concepts. For example, if a user watched the movie "Ip Man," the associated concepts might include "action," "martial arts," and "Chinese film." The concept embedding matrix is ​​used to represent all concepts in the concept library, where each row corresponds to a vector representation of a concept.

[0070] In this step, a historical concept sequence is obtained based on the historical behavior sequence and the concept library, thus acquiring a set of concepts associated with the historical behavior sequence. Furthermore, by learning the embedding representations of concepts, a concept embedding matrix is ​​obtained, enabling a better understanding of the semantic relationships between different concepts. This transforms abstract concepts into concrete vector representations, facilitating computation and processing.

[0071] Optionally, the process of obtaining the concept embedding matrix based on the concept library may include, but is not limited to, the following steps.

[0072] First, based on the concept library Constructing a concept embedding matrix ,in It is the number of concepts in the concept library. It is the dimension of the feature vector of each concept.

[0073] Secondly, based on a certain moment in the historical concept sequence Corresponding concept set , for concept embedding matrix By performing a search operation, we can obtain... Each concept feature vector ,in , For a pre-defined concept set A fixed value for the number of concepts in the middle.

[0074] Furthermore, in order to explore middle The correlations between concepts are analyzed by performing a linear projection transformation, concatenating them in the last dimension to obtain the time-series of historical concepts. Corresponding conceptual information set , Satisfy the following formula (1):

[0075] (1);

[0076] In equation (1), Describe a set of linear projection transformation matrices. This indicates a splicing operation.

[0077] Next, based on the set of concept information corresponding to all moments in the historical concept sequence, we predict subsequent concepts that users might like. A sequence modeling encoder is constructed using a self-attention mechanism. encoder Satisfy the following formula (2):

[0078] (2);

[0079] In equation (2), This represents the set of conceptual information corresponding to all moments in a historical conceptual sequence. This represents a Transformer block, which includes a self-attention layer and a feedforward neural network layer. By stacking multiple Transformer blocks, the semantic relevance between concepts and user preferences for certain concepts can be captured more comprehensively, thereby predicting subsequent concept sequences. Subsequent concept sequence Satisfy the following formula (3):

[0080] (3);

[0081] In equation (3), It is a concept embedding matrix The transpose of .

[0082] To simplify concept feature learning, subsequent concept sequences will be used. The corresponding truth value is set to the largest concept value among them. ,Right now Therefore, based on the cross-entropy loss function, the optimization function of the concept embedding matrix is... Satisfy the following formula (4):

[0083] (4);

[0084] Finally, based on the optimization function of the concept embedding matrix , for concept embedding matrix Optimize.

[0085] S103. Based on the historical behavior sequence, historical concept sequence, and concept embedding matrix, and combined with the association strategy between concepts and behaviors, the concept weight matrix and concept behavior sequence set are obtained.

[0086] It should be noted that the concept weight matrix quantifies the degree of influence of each concept on user behavior. Different concepts may have different importance in different scenarios, and the concept weight matrix helps identify which concepts are more critical. The concept and behavior association strategy is used to establish connections between historical behavior sequences and historical concept sequences. By analyzing the relationship between user behavior and related concepts, it associates abstract concepts with concrete behaviors, thereby better understanding changes in user preferences.

[0087] In this step, by introducing a concept-behavior association strategy, user behavior data is fused with concept information, and a concept weight matrix and concept behavior sequence set are constructed accordingly. This allows for a higher-level understanding of user concept and behavior patterns, which not only helps generate more accurate recommendation results but also provides concept-based explanations, enhancing the interpretability of the recommendation results.

[0088] S104. Based on the historical behavior sequence, concept embedding matrix, concept weight matrix, and concept behavior sequence set, perform sequence recommendations for users to obtain interpretable sequence recommendation results.

[0089] In this step, based on historical behavior sequences, concept embedding matrices, concept weight matrices, and concept behavior sequence sets, we predict projects or concepts that users may be interested in in the future. This not only considers users' historical behavior but also integrates relevant concept information from historical behavior, helping users understand why specific projects are recommended to them and enhancing the transparency and credibility of the recommendation results.

[0090] In some embodiments of this application, the process of obtaining the concept weight matrix and concept behavior sequence set in step S103 above, based on the historical behavior sequence, historical concept sequence and concept embedding matrix, and combined with the association strategy of concepts and behaviors, may include, but is not limited to, the following steps.

[0091] S201, based on the historical behavior sequence, the first behavior sequence and the second behavior sequence are obtained.

[0092] In this step, by obtaining the first and second behavior sequences based on historical behavior sequences, we can better understand how the recommendation results will change if the user takes different actions. This helps to generate diverse interpretations of the recommendation results and improves their interpretability.

[0093] S202, based on the historical behavior sequence, historical concept sequence, and concept embedding matrix, and combined with the association strategy of concepts and behaviors, we obtain the concept weight matrix, the first concept behavior sequence, and the second concept behavior sequence.

[0094] It should be noted that the concept behavior sequence set includes the first behavior sequence, the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence.

[0095] In this step, by generating first-concept behavior sequences and second-concept behavior sequences, user behavior data and related conceptual information are obtained, providing a comprehensive data foundation for subsequent recommendations and explanations. By combining concept and behavior association strategies, a concept embedding matrix and a concept weight matrix are constructed, enabling the understanding and explanation of user behavior patterns from multiple dimensions, thereby generating higher-quality recommendation results and explanations.

[0096] In some embodiments of this application, reference is made to Figure 2 , Figure 2 This is a flowchart of determining the first behavior sequence and the second behavior sequence provided in this application; in the above step S201, the process of obtaining the first behavior sequence and the second behavior sequence based on the historical behavior sequence may include, but is not limited to, the following steps.

[0097] S301. Based on the historical behavior sequence and combined with the positive sample sampling processing method, the first behavior sequence is obtained.

[0098] In this step, positive sampling is performed on the user's historical behavior sequences to extract representative behaviors that are highly relevant to the user's interests or preferences, forming the first behavior sequence. This first behavior sequence reflects the user's past behavioral patterns, improving the relevance and accuracy of the recommendation results. Simultaneously, sampling reduces the amount of data, improves processing efficiency, and retains key information.

[0099] Optionally, the first row of the sequence satisfies the following formula (5):

[0100] (5);

[0101] In equation (5), The first row is the sequence. A set representing sequences of similar behaviors. It represents a historical sequence of actions.

[0102] S302, perform counterfactual transformation on the historical behavior sequence to obtain the second behavior sequence.

[0103] It should be noted that counterfactual transformation refers to generating new behavior sequences by replacing or modifying certain behaviors in a user's historical behavior sequence, thereby simulating different behavioral paths that the user may take.

[0104] In this step, the second behavioral sequence generated through counterfactual transformation is similar to but slightly different from the historical behavioral sequence. This second behavioral sequence is used to explore how the recommendation results would change if the user took different actions. Furthermore, counterfactual transformation provides diverse interpretations of recommendations, helping users understand the logic behind the recommendations. For example, if a user did not purchase a certain item, the system can show the possible changes in recommendations if that item were purchased. Therefore, the second behavioral sequence helps to understand and adapt to changes in user preferences, thus providing more flexible and personalized recommendations.

[0105] Optionally, the second row of the sequence satisfies the following formula (6):

[0106] (6);

[0107] In equation (6), The second line represents the sequence. It is a pre-defined counterfactual converter. Represents a historical sequence of actions;

[0108] Optionally, the loss function for the recommendation task based on the second action sequence satisfies the following formula (7):

[0109] (7);

[0110] In equation (7), It is the loss function for recommendation tasks based on the second-order sequence; Indicates a counterfactual objective; The second line represents a sequence. After sequence encoder The predicted value generated after encoding; It is a regression loss function used to evaluate the predicted value. Counterfactual objectives The gap between them; It is the distribution distance loss function, used to measure the historical behavior sequence. Second line sequence Differences in distribution; It is control and right The contribution of hyperparameters to balance the parameters.

[0111] In summary, through optimization The second line sequence can be narrowed down. After sequence encoder Predicted values ​​generated after encoding and counterfactual objectives The gap between them can be addressed through optimization. It can narrow down the historical behavior sequence With the second line sequence The gap between them. By optimizing the overall loss function. The second line can be used as a sequence. and counterfactual objectives This lays the foundation for subsequent explainable recommendation tasks.

[0112] Optionally, a sequence encoder The settings can be adjusted according to the actual situation, and this application does not impose specific limitations on them.

[0113] For example, sequence encoders It can be an RNN or a Transformer, but it is not limited to these.

[0114] Optionally, the regression loss function The settings can be adjusted according to the actual situation, and this application does not impose specific limitations on them.

[0115] For example, regression loss function It can be a cross-entropy loss function, but it is not limited to this.

[0116] Optionally, the distribution distance loss function The settings can be adjusted according to the actual situation, and this application does not impose specific limitations on them.

[0117] For example, the distribution distance loss function It can be used to measure behavioral similarity or Regularization terms, but not limited to these.

[0118] In some embodiments of this application, reference is made to Figure 3 , Figure 3 This is a flowchart of the process for determining the concept weight matrix, the first concept behavior sequence, and the second concept behavior sequence provided in this application. In step S202 above, the process of obtaining the concept weight matrix, the first concept behavior sequence, and the second concept behavior sequence based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the association strategy of concepts and behaviors, may include, but is not limited to, the following steps.

[0119] S401. Based on the historical behavior sequence, historical concept sequence, and concept embedding matrix, and combined with the association strategy between concepts and behaviors, a concept weight matrix is ​​obtained.

[0120] It should be noted that the concept weight matrix is ​​used to measure the contribution of each concept in the historical concept sequence to its related behavior.

[0121] In this step, by constructing a concept weight matrix, we can obtain the degree of influence of each concept in the historical concept sequence on each behavior in the historical behavior sequence. This can identify which concepts are more important in specific situations, helping to capture user preferences more accurately and thus improve the relevance and accuracy of recommendations.

[0122] S402, based on the historical behavior sequence, concept embedding matrix and concept weight matrix, the first concept behavior sequence and the second concept behavior sequence are obtained.

[0123] In this step, by combining user behavior information with relevant conceptual information, a first concept behavior sequence and a second concept behavior sequence containing rich contextual information are generated. This not only considers user behavior but also the concepts behind these behaviors, thereby understanding and explaining user behavior patterns from multiple dimensions and improving the quality and relevance of recommendation results.

[0124] In some embodiments of this application, the process of obtaining the first concept behavior sequence and the second concept behavior sequence in step S402 above, based on the historical behavior sequence, the concept embedding matrix, and the concept weight matrix, may include, but is not limited to, the following steps.

[0125] S501, the product of the concept weight matrix and the concept embedding matrix is ​​added to the historical behavior sequence to obtain the first concept behavior sequence.

[0126] In this step, by multiplying the concept weight matrix with the concept embedding matrix, the relative importance of concepts is combined with their specific features, resulting in a new representation that integrates the importance and features of each concept, thus better reflecting the impact of these concepts on user behavior. Next, this product is added to the historical behavior sequence to obtain the first concept behavior sequence. This first concept behavior sequence integrates user behavior data and related concept information, including not only past actual user behavior but also the conceptual meaning behind these behaviors. It provides richer contextual information, thereby more accurately capturing changes in user preferences and improving the accuracy and interpretability of recommendation results.

[0127] Optionally, the first concept behavior sequence satisfies the following formula (8):

[0128] (8);

[0129] In equation (8), Represents a sequence of first-concept behaviors. Represents a historical sequence of behaviors. Represents the concept embedding matrix. This represents the concept weight matrix.

[0130] S502, masking the first concept behavior sequence to obtain the second concept behavior sequence.

[0131] In this step, by masking certain concepts in the first concept behavior sequence that may negatively affect the recommendation results, a second concept behavior sequence is generated. This not only better addresses noise and anomalies but also provides more diverse and reasonable explanations for the recommendation results.

[0132] Optionally, the process of masking the first concept behavior sequence to obtain the second concept behavior sequence may include, but is not limited to, the following steps.

[0133] First, construct a trainable binary matrix. And according to the binary constraint conditions To ensure The element value is located in binary constraint conditions Satisfy the following formula (9):

[0134] (9);

[0135] In equation (9), Indicates an indicator function, It is the threshold for determining whether to block behavioral sequences.

[0136] Then, using binary matrices To the first concept of behavioral sequence Some concepts that might negatively impact the recommendation results are masked to generate a second concept behavior sequence. Second concept: behavioral sequence The following formula (10) is satisfied:

[0137] (10);

[0138] In equation (10), It represents the Hadamardi (or Hadama) stack.

[0139] Finally, through the masking loss function To optimize the second concept behavior sequence , occlusion loss function Satisfy the following formula (11):

[0140] (11);

[0141] In equation (11), Represents the cross-entropy loss function. Representing binary constraints of Regularization, Indicates a counterfactual objective. Representing a second concept of behavioral sequence After sequence encoder The predicted value generated after encoding.

[0142] In some embodiments of this application, the process of performing sequence recommendations for users based on historical behavior sequences, concept embedding matrices, concept weight matrices, and concept behavior sequence sets in step S104 above, and obtaining interpretable sequence recommendation results, may include, but is not limited to, the following steps.

[0143] S601. Based on the historical behavior sequence and concept behavior sequence set, an interpretable recommendation model is used to obtain the sequence recommendation result set.

[0144] In this step, by using an interpretable recommendation model based on historical behavior sequences and concept behavior sequence sets, a sequence recommendation result set is obtained. This allows the recommendation process to integrate coarse-grained conceptual information and fine-grained behavioral information, capturing richer contextual information and helping to discover users' potential interests. This improves the relevance and diversity of recommendations, laying the foundation for providing detailed recommendation explanations in the future, and ensuring that the recommendations are not only accurate but also reasonably interpretable.

[0145] S602. Based on the sequence recommendation result set, historical behavior sequence, concept behavior sequence set, concept embedding matrix, and concept weight matrix, an interpretable recommendation model is used to obtain interpretable sequence recommendation results.

[0146] In this step, an interpretable recommendation model integrates the sequence recommendation result set, historical behavior sequences, concept embedding matrix, and concept weight matrix. This approach considers both user behavior habits and relevant conceptual information. The concept embedding matrix provides a vector representation of each concept, while the concept weight matrix reflects the importance of each concept to user preferences. This interpretable recommendation model, combining the concept embedding and concept weight matrices, clearly explains how recommendation results are influenced by different concepts. This provides more accurate and easily understandable recommendations, making it easier for users to understand why certain items are recommended to them. It also enhances the persuasiveness of the recommendation method, making recommendations more personalized and targeted.

[0147] Optionally, the interpretation of the recommendation results by the interpretable recommendation model, which combines the concept embedding matrix and the concept weight matrix, satisfies the following formula (12):

[0148] (12);

[0149] In equation (12), This indicates that the recommendation model can explain the recommendation results; according to formula (8), the second concept behavior sequence ,therefore For the second concept of behavioral sequence After sequence recommender The predicted value obtained after encoding; Represents the concept weight matrix of Regularization, Represents the concept weight matrix of Regularization, It is used for balance The hyperparameters of the contribution, It is used for balance The hyperparameters contributing to this.

[0150] Through the architecture of elastic networks, the concept weight-based interpretation utilizes the concept weight matrix. of Regularization achieves sparsity, filtering out a small number of irrelevant concepts. Additionally, there's the concept weight matrix. of Regularization guarantees the concept weight matrix The correctness of the concept weight matrix is ​​thus ensured, leading to a reasonable explanation. The combination of these two regularization methods optimizes the concept weight matrix. Concepts with a smaller impact on the outcome tend to have a weight of 0, while some concepts that are relatively important for counterfactual prediction are given a larger weight value.

[0151] In some embodiments of this application, the process of obtaining a sequence recommendation result set by using an interpretable recommendation model based on the historical behavior sequence and the concept behavior sequence set in step S601 above may include, but is not limited to, the following steps.

[0152] S701. Based on the historical behavior sequence, the first sequence recommendation result is obtained using an interpretable recommendation model.

[0153] In this step, recommendation prediction is performed based on the historical behavior sequence to obtain the first sequence recommendation result, providing a baseline recommendation based on the historical behavior sequence.

[0154] S702, based on the first behavior sequence of the concept behavior sequence set, the second sequence recommendation result is obtained using an interpretable recommendation model.

[0155] In this step, recommendations are made based on the first behavioral sequence, which is highly relevant to and representative of user interests or preferences in the concept behavior sequence set, to obtain the second sequence recommendation results, which can more accurately reflect the user's potential needs.

[0156] S703, based on the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence of the concept behavior sequence set, the third sequence recommendation result is obtained using an interpretable recommendation model.

[0157] In this step, a third sequence recommendation result is obtained by integrating the second behavioral sequence after counterfactual transformation, the first concept behavioral sequence which integrates conceptual information and behavioral information, and the second concept behavioral sequence. This aims to explore how user preferences are expressed under the combination of multiple concepts and behaviors, to more comprehensively reflect the user's possible interests, and to make more diversified recommendations accordingly.

[0158] S704. Based on the first concept behavior sequence of the concept behavior sequence set, the fourth sequence recommendation result is obtained using an interpretable recommendation model.

[0159] In this step, recommendation prediction is performed based on the first concept-behavior sequence, which integrates concept information and behavior information, to obtain the fourth sequence recommendation result.

[0160] S705. Based on the second concept behavior sequence of the concept behavior sequence set, the fifth sequence recommendation result is obtained using an interpretable recommendation model.

[0161] In this step, by predicting recommendations based on the masked second concept behavior sequence, the fifth sequence recommendation result is obtained. This can filter out concepts that may negatively affect the recommendation effect, thereby improving the quality and diversity of recommendations.

[0162] S706, the recommendation results of the first sequence, the second sequence, the third sequence, the fourth sequence, and the fifth sequence are used as the sequence recommendation result set.

[0163] In this step, all the recommendation results generated in the previous steps are summarized to form a complete set of recommendation results, providing comprehensive recommendation suggestions for subsequent steps.

[0164] In some embodiments of this application, in steps S601 and S602 above, the interpretable recommendation model includes a counterfactual interpretation model.

[0165] Counterfactual explanation models are a technique used in recommender systems that predict changes in recommendation outcomes by simulating changes in user behavior, thus providing an explanation behind the recommendations. The main purpose of using counterfactual explanation models is to enhance the interpretability, transparency, and user experience of recommender systems. It helps users understand how recommendations are generated and demonstrates how different behaviors may lead to different recommendation results. By combining sequential recommendation result sets, historical behavior sequences, concept embedding matrices, and concept weight matrices, counterfactual explanation models can create hypothetical scenarios, observe changes in recommendation results after adjusting user behavior or concept weights, and thus identify specific factors that significantly influence recommendations, providing users with clear and concrete explanations for the recommendations.

[0166] In some embodiments of this application, the optimization method for the counterfactual explanation model includes a contrastive learning method.

[0167] Contrastive learning is an unsupervised or self-supervised learning method that enables models to learn the intrinsic structure of data and generate high-quality feature representations by distinguishing between positive sample pairs (similar samples) and negative sample pairs (dissimilar samples). This approach not only improves the quality of feature representations and the robustness of the model, but also effectively utilizes unlabeled data and promotes transfer learning.

[0168] Effective counterfactual explanations hinge on quantifying and reflecting the influence of a particular concept within a sequence of conceptual behaviors. This process can be achieved through contrastive learning, comparing a user's historical behavioral sequences with a set of conceptual behavioral sequences. If a concept contributes significantly to the sequence, its addition should result in a noticeable change in the sequence's performance. Conversely, if a concept contributes little, its addition should not alter the sequence's performance significantly. Therefore, contrastive learning can quantify the influence of a concept.

[0169] In counterfactual explanation models, contrastive learning optimizes the model by generating positive sample pairs of actual behavior and adjusted behavior, and negative sample pairs of completely unrelated behavior. This allows the model to learn subtle differences in user behavior patterns, helping to identify which factors influence recommendation results, thereby enhancing the interpretability of the recommendation system and enabling users to better understand the recommendation logic.

[0170] Optionally, the implementation process of the optimization method for the counterfactual explanation model may include, but is not limited to, the following steps.

[0171] First, similar to step S102 above, the loss function of the concept embedding matrix is ​​obtained based on the concept embedding matrix and formula (4). This helps improve the model's generalization ability and stability because it is built based on the user's preference for choosing concepts. This means that the model can understand and learn the relationships between concepts from more perspectives, thereby improving the accuracy and stability of recommendations.

[0172] Secondly, based on the first sequence recommendation result, the second sequence recommendation result, and the third sequence recommendation result in the sequence recommendation result set, the first contrastive learning loss function is constructed.

[0173] The first contrastive learning loss function satisfies the following formula (13):

[0174] (13);

[0175] In equation (13), This represents the first contrastive learning loss function; Represents similarity functions; This represents the first sequence recommendation result, i.e., the historical behavior sequence. After sequence recommender The predicted value obtained after encoding; This indicates the recommendation result for the second sequence, where the first row represents the sequence. After sequence recommender The predicted value obtained after encoding; This represents the third sequence recommendation result, which is a combination of the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence. After sequence recommender The predicted value obtained after encoding; It is a hyperparameter for controlling the contrast temperature.

[0176] Then, based on the first sequence recommendation result, the second sequence recommendation result, the fourth sequence recommendation result, and the fifth sequence recommendation result in the sequence recommendation result set, a second contrastive learning loss function is constructed, which satisfies the following formula (14):

[0177] (14);

[0178] In equation (14), This represents the second contrastive learning loss function; This represents the recommendation result of the fourth sequence, i.e., the first concept behavior sequence. After sequence recommender The predicted value obtained; This represents the recommendation result of the fifth sequence, i.e., the second concept behavior sequence. After sequence recommender The predicted value obtained.

[0179] Optionally, sequence recommender The settings can be adjusted according to the actual situation, and this application does not impose specific limitations on them.

[0180] For example, sequence recommenders It can be an RNN or a Transformer, but it is not limited to these.

[0181] By optimizing the first contrastive learning loss function Second contrastive learning loss function A sequence recommender can be expected and The model learns how to correctly handle various types of behavioral sequences and accurately distinguish between similar and dissimilar sequences. Thus, when given a new sequence, the model can use its learned knowledge to determine its category, thereby providing better recommendation services. Furthermore, the first contrastive learning loss function... Second contrastive learning loss function Optimization also helps improve the model's generalization ability because it is calculated based on the similarity of multiple sample pairs, rather than relying solely on a single sample. This means the model can understand and learn the relationships between sequences from more perspectives, thereby improving the accuracy and stability of recommendations.

[0182] Furthermore, based on the concept weight matrix, historical behavior sequence, and concept behavior sequence set, a recommendation task loss function is constructed, which satisfies the following formula (15):

[0183] (15);

[0184] In equation (15), This represents the loss function for the recommendation task; Represents the cross-entropy loss function; express , and Combinations through a sequence recommender The predicted value obtained; yes and Combinations through a sequence recommender The predicted value obtained; yes After sequence recommender The predicted values ​​obtained, Representing binary constraints of Regularization.

[0185] Finally, the counterfactual explanation model is optimized through a comprehensive loss function, which satisfies the following formula (16):

[0186] (16);

[0187] In equation (16), Represents the comprehensive loss function. It is used to control the first contrastive learning loss function The hyperparameters of the contribution, It is used to control the second contrastive learning loss function The hyperparameters contributing to this.

[0188] Reference Figure 4 , Figure 4 This is a structural diagram of the explainable sequence recommendation system that integrates concepts and behaviors provided in this application. The explainable sequence recommendation system that integrates concepts and behaviors provided in this application may include, but is not limited to, the following modules.

[0189] Data acquisition module 801 is used to acquire the concept library and the user's historical behavior sequence;

[0190] The concept embedding module 802 is used to obtain the historical concept sequence and the concept embedding matrix based on the historical behavior sequence and the concept library;

[0191] The concept and behavior association module 803 is used to obtain the concept weight matrix and the concept behavior sequence set based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the concept and behavior association strategy.

[0192] The interpretable sequence recommendation module 804 is used to make sequence recommendations to users based on historical behavior sequences, concept embedding matrices, concept weight matrices, and concept behavior sequence sets, and obtain interpretable sequence recommendation results.

[0193] On another front, embodiments of this application provide an interpretable sequence recommendation apparatus that integrates concepts and behaviors, including:

[0194] At least one processor;

[0195] At least one memory for storing at least one program;

[0196] When the at least one program is executed by the at least one processor, the at least one processor implements the aforementioned interpretable sequence recommendation method that integrates concepts and behaviors.

[0197] The following performance comparison experiments will be used to verify the advanced performance of the interpretable sequence recommendation method, system, and apparatus for fusing concepts and behaviors provided in this application.

[0198] First, the following seven classic sequence recommendation models are selected as comparative models for the Contrastive Conceptual Counterfactual Explanation for Sequential Recommendation (3Ce4Sr) method that integrates concepts and behaviors provided in this application.

[0199] 1. GRU4Rec (Gated Recurrent Unit for Session-based Recommendation) is a sequence recommendation model based on gated recurrent units. It leverages the powerful memory capabilities of the GRU network to capture long-term dependencies in user behavior sequences and makes recommendations accordingly. Although GRU4Rec can handle dynamic changes over time, its performance is heavily dependent on the expressive power of the GRU itself.

[0200] 2. STAMP (Short-Term Attention / Memory Priority Model) is a model that combines short-term attention mechanisms with memory prioritization. This model aims to improve the ability to capture recent preferences by focusing on recent behavior. However, STAMP is limited by the expressive power of traditional attention mechanisms and may fail to fully understand complex user preference patterns in some situations.

[0201] 3. SASRec (Self-Attention based Sequential Recommendation) is a sequence recommendation model based on a self-attention mechanism. By introducing a self-attention layer, SASRec can better capture the complex relationships within user behavior sequences. This mechanism allows the model to establish connections between different positions, thereby enhancing recommendation performance.

[0202] 4. BERT4Rec (Bidirectional Encoder Representations from Transformers for Sequential Recommendations) employs an architecture similar to BERT, widely used in natural language processing, for sequence recommendation. Through a deep bidirectional self-attention mechanism, BERT4Rec can more effectively encode the user's interaction history, providing context-aware representations.

[0203] 5. CauseRec (Counterfactual User Sequence Synthesis for Sequential Recommendation) is a sequence recommendation model augmented with counterfactual data. It not only provides recommendation results but also offers diverse explanations for recommendations through partial behavior substitution, improving the transparency and credibility of the recommendation system. CauseRec uses an attention mechanism to distinguish concepts, providing users with clearer explanations.

[0204] 6. CL4SRec (Contrastive Learning for Sequential Recommendation) is a sequence recommendation model based on contrastive learning that optimizes recommendation performance by introducing various data augmentation strategies. This method enhances the model's understanding of user behavior sequences by comparing the differences between positive and negative samples, thereby improving recommendation quality.

[0205] 7. DuoRec (Contrastive Learning for Representation Degeneration Problem in Sequential Recommendation) is a sequence recommendation model that introduces supervised contrastive learning, demonstrating the effectiveness of self-supervised contrastive learning. By comparing the similarities and differences between different user behavior sequences, DuoRec can learn higher-quality user representations, thereby improving recommendation performance.

[0206] To better verify the effectiveness of the above eight models, this application uses two commonly used evaluation metrics in recommendation systems, HR@N (Hit Ratio at N) and NDCG@N (Normalized Discounted Cumulative Gain at N), as performance comparison evaluation metrics, where N = {5, 10}. These metrics are usually used to evaluate the quality of the top items in the recommendation list, because users often only pay attention to the first few items in the recommendation list.

[0207] 1. HR@N measures the percentage of users who actually interact with (e.g., click, purchase) any of the top N recommended items. A "hit" is considered successful if any item in the recommendation list is something the user is genuinely interested in or has already interacted with.

[0208] 2. NDCG@N not only considers whether the top N items in the recommendation list contain items that the user has actually interacted with, but also further considers the ranking order of these items and their relevance. It is calculated using a discount-cumulative gain and normalized to eliminate the influence of different recommendation list lengths among different users.

[0209] Furthermore, this application embodiment selects four public datasets to verify the performance of the above eight models. The four public datasets are Beauty, Clothing, Sports, and Diginetica. The Beauty, Clothing, and Sports datasets are selected from Amazon datasets, while the Diginetica dataset comes from CIKM Cup 2016 and includes user historical behavior extracted from e-commerce search engine logs. Since these four public datasets already contain rich item category information, this application embodiment directly extracts this category information as concepts.

[0210] Referring to Table 1 below, which shows the statistical information for the four public datasets mentioned above, "Dataset" represents the dataset name, "*Users" represents the number of users in each dataset, "Items" represents the number of items / products in each dataset, "Concepts" represents the number of concepts in each dataset, "Interactions" represents the number of interactions between users and items, which is the total number of behavioral records generated by users in the dataset, "Asl" represents the average number of items per user in their behavioral sequence, and "Sparsity" represents the average number of items per user in their behavioral sequence.

[0211] This indicates the sparsity of the dataset.

[0212] Table 1 Statistical information for the four datasets

[0213]

[0214] For data preprocessing, this application first filters out sequences with a length less than 3 from the dataset. Then, all concepts are collected and stored in a concept library. To prepare for concept learning, this application finds the concept corresponding to each behavior sequence, forming the associated concept state. Finally, subsequences are generated for concept comparison learning. To ensure fair comparison, the data processing details of this application are consistent with existing comparison methods.

[0215] Referring to Table 2 below, Table 2 shows the performance comparison experimental results of 3Ce4Sr proposed in the embodiments of this application and seven comparative models.

[0216] Table 2 Performance Comparison Experiment Results (%)

[0217]

[0218] As shown in Table 2 above, for contrastive models, STAMP is limited by the expressive power of traditional attention mechanisms, which restricts its ability to capture complex user behavior patterns. GRU4Rec heavily relies on the performance of Gated Recurrent Units (GRUs), and its recommendation performance largely depends on the memory and processing capabilities of the GRU network. SASRec leverages the powerful sequence modeling capabilities of self-attention mechanisms, and its performance on some datasets (such as Diginetica) even surpasses that of the contrastive learning method CL4SRec. BERT4Rec, based on a deep bidirectional self-attention mechanism, outperforms SASRec overall, and can more effectively encode users' interaction history, providing context-aware representations. CL4SRec's advantage lies in introducing various data augmentation strategies to optimize recommendation performance. CauseRec uses counterfactual data augmentation techniques, and its overall performance is slightly better than SASRec, providing users with diverse recommendation explanations. DuoRec's performance is second only to the 3Ce4Sr model proposed in this application, demonstrating the effectiveness of self-supervised contrastive learning and showing excellent performance.

[0219] In contrast, the 3Ce4Sr model proposed in this application not only employs a contrastive learning approach but also deeply integrates conceptual semantics into user behavior sequences through concept-behavior association and concept contrast. This comprehensive approach enables 3Ce4Sr to gain a deeper understanding of user preferences and outperforms other similar techniques on four performance evaluation metrics across four datasets, thus validating the superiority and effectiveness of 3Ce4Sr in terms of performance.

[0220] In addition, embodiments of this application will verify the interpretability of the interpretable sequence recommendation method, system, and apparatus for fusing concepts and behaviors provided in this application through the following interpretable experimental examples.

[0221] First, three classic interpretable models are selected as comparative models with the concept- and behavior-integrated interpretable sequence recommendation method 3Ce4Sr provided in this application: Random Explanation (RndExpl), Salience-based Explanation (SalExpl), and CauseRec. RndExpl achieves counterfactual explanations based on randomly selected concepts, independent of any model or data characteristics. SalExpl generates counterfactual explanations by weighting the concept sequence and selecting the highest and lowest-scoring concepts, using significance scores to determine which concepts are most important for prediction.

[0222] Furthermore, the embodiments of this application also selected the above four public datasets Beauty, Clothing, Sports and Diginetica to verify the interpretability of the above four interpretable models.

[0223] Then, to achieve interpretable recommendations for the contrast model, for RndExpl, this embodiment generates counterfactual explanations by randomly selecting concepts. For SalExpl, this embodiment first generates relevant weights for each concept in the concept sequence, and then selects the concepts with the highest and lowest scores to construct counterfactual explanations. For CauseRec, this embodiment distinguishes the importance of different concepts by combining an attention mechanism, thereby achieving counterfactual explanations. In particular, SalExpl and CauseRec extract concept states to form a concept sequence in the same way as 3Ce4Sr, and select the concept with the largest value in the concept state as a representative to predict counterfactual concepts.

[0224] To examine the explanatory performance of several concept-related models, this embodiment selects SalExpl, CauseRec, and 3Ce4Sr for a direct comparison of the explanatory results. For SalExpl, this embodiment uses saliency scores to evaluate the impact of each concept on counterfactual predictions. For CauseRec, this embodiment uses attention weight scores to measure the importance of each concept. Concept scores indicate the degree of influence of a concept on counterfactual predictions. Specifically, a positive concept score means that the concept has a positive impact on the prediction result; a negative concept score indicates that the concept has a negative impact on the prediction result.

[0225] Reference Figure 4 and Figure 5 , Figure 4 This is a comparison chart of concept scores for SalExpl, CauseRec, and 3Ce4Sr on the Sports dataset provided in this application; Figure 5 These are the concept scores of SalExpl, CauseRec, and 3Ce4Sr provided in this application on the Clothing dataset.

[0226] As can be seen, the 3Ce4Sr model can make correct predictions from concepts with low scores, indicating that even seemingly unimportant concepts can influence the final recommendation results. The 3Ce4Sr model can also identify and propose concepts that may contribute significantly to counterfactual predictions. By identifying concepts that have a significant impact in counterfactual scenarios, the 3Ce4Sr model can provide a more comprehensive and in-depth explanation.

[0227] Furthermore, the 3Ce4Sr model generates relatively high concept scores, meaning its counterfactual explanations are more sensitive to changes in recommendation outcomes. It can more accurately capture subtle relationships between concepts and results, thus providing more accurate and detailed explanations compared to other models. This capability makes 3Ce4Sr not only excellent in recommendation accuracy but also enhances the interpretability and transparency of the recommendation system.

[0228] Secondly, in order to better verify the effectiveness of the above four interpretable models, this application uses the following two commonly used evaluation metrics in recommendation systems, fidelity and stability, to evaluate the quality of concept counterfactual explanations.

[0229] 1. Fidelity is a metric used to measure the interpretability of a recommendation model, defined as the percentage of explainable items out of the total number of recommended items. High fidelity means the model can provide reasonable explanations for more recommendation results.

[0230] 2. Stability measures the consistency of the explanations generated by a model across multiple runs. A stable explanatory model should produce similar results under the same conditions, indicating the model's reliability and consistency.

[0231] Reference Figure 6 and Figure 7 , Figure 6 This is a comparison chart of the fidelity of RndExpl, SalExpl, CauseRec, and 3Ce4Sr on four public datasets provided in this application; Figure 7 This is a stability comparison chart of RndExpl, SalExpl, CauseRec, and 3Ce4Sr provided in this application on four public datasets.

[0232] The performance of the four interpretable models shows that RndExpl, as a stochastic method, performs the worst in terms of fidelity and stability. SalExpl, by introducing a saliency-weighted algorithm to assign weights to different concepts, outperforms RndExpl overall. CauseRec employs an attention mechanism to grasp the global relevance of concepts across the entire behavioral sequence, thus performing slightly better than SalExpl. Compared to these methods, the proposed 3Ce4Sr model exhibits the highest fidelity and stability across the four datasets. High fidelity means that 3Ce4Sr can provide more conceptual explanations when recommending the same number of items, consistent with the model's ability to explain different concepts. Furthermore, high stability indicates that the conceptual explanations generated by the proposed method are generally the same in multiple model predictions under identical conditions and are consistent with the data. In summary, the advantages in fidelity and stability increase the persuasiveness of the model's predictions and user trust in the model, making users more receptive to the conceptual explanations of 3Ce4Sr.

[0233] In summary, the embodiments of this application can provide the following technical effects:

[0234] On the one hand, this application effectively integrates abstract conceptual information with specific user behaviors by introducing a concept-behavior association strategy, achieving a deeper understanding of user preferences. Specifically, this application first obtains the user's historical behavior sequence and associated historical concept sequence, and then constructs a concept embedding matrix and a concept weight matrix to represent these concepts and their importance to related behaviors. The concept embedding matrix captures the semantic relationships between concepts, while the concept weight matrix reflects the degree of influence of each concept on predicting user behavior. Therefore, this application can dynamically adjust the model's understanding and interpretation of user preferences, enabling the recommendation system to not only be based on the user's historical behavior but also to incorporate a broader conceptual context, thereby improving the accuracy and personalization of the recommendation results.

[0235] On the other hand, this application introduces a contrastive learning method to optimize the counterfactual explanation model. The optimized counterfactual explanation model can more effectively capture the complex relationships between user behavior and related concepts, and use these relationships to generate more accurate and meaningful recommendations and explanations. This not only improves the model's performance metrics such as accuracy and recall, but also ensures that the generated counterfactual explanations have higher fidelity and stability, ultimately providing users with a recommendation experience that is both practical and easy to understand.

[0236] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0237] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. An interpretable sequence recommendation method that integrates concepts and behaviors, characterized in that, Includes the following steps: Obtain a concept library and the user's historical behavior sequence; the concept library is a collection of all possible concepts; Based on the historical behavior sequence and the concept library, a historical concept sequence and a concept embedding matrix are obtained; the historical concept sequence is a sequence of concepts corresponding to items related to the user's historical behavior sequence; the concept embedding matrix is ​​used to represent the feature vectors of all concepts in the concept library. Based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, and combined with the concept and behavior association strategy, a concept weight matrix and a concept behavior sequence set are obtained; the concept and behavior association strategy is used to obtain the relationship between the historical behavior sequence and the historical concept sequence. Based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix, and the concept behavior sequence set, sequence recommendations are made for the user to obtain interpretable sequence recommendation results.

2. The interpretable sequence recommendation method that integrates concepts and behaviors according to claim 1, characterized in that, The concept behavior sequence set includes a first behavior sequence, a second behavior sequence, a first concept behavior sequence, and a second concept behavior sequence; the step of obtaining a concept weight matrix and a concept behavior sequence set based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the concept and behavior association strategy, includes: Based on the historical behavior sequence, the first behavior sequence and the second behavior sequence are obtained; Based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, and combined with the association strategy between the concept and the behavior, the concept weight matrix, the first concept behavior sequence, and the second concept behavior sequence are obtained.

3. The interpretable sequence recommendation method that integrates concepts and behaviors according to claim 2, characterized in that, The step of obtaining the first behavior sequence and the second behavior sequence based on the historical behavior sequence includes: Based on the historical behavior sequence, combined with the positive sample sampling processing method, the first behavior sequence is obtained; The historical behavior sequence is subjected to counterfactual transformation to obtain the second behavior sequence.

4. The interpretable sequence recommendation method that integrates concepts and behaviors according to claim 2, characterized in that, The step of obtaining the concept weight matrix, the first concept behavior sequence, and the second concept behavior sequence based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the concept and behavior association strategy, includes: Based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, and combined with the association strategy between the concepts and behaviors, the concept weight matrix is ​​obtained; the concept weight matrix is ​​used to measure the contribution of each concept in the historical concept sequence to its related behaviors. The first concept behavior sequence and the second concept behavior sequence are obtained based on the historical behavior sequence, the concept embedding matrix, and the concept weight matrix.

5. The interpretable sequence recommendation method that integrates concepts and behaviors according to claim 4, characterized in that, The step of obtaining the first concept behavior sequence and the second concept behavior sequence based on the historical behavior sequence, the concept embedding matrix, and the concept weight matrix includes: The product of the concept weight matrix and the concept embedding matrix is ​​added to the historical behavior sequence to obtain the first concept behavior sequence; The first concept behavior sequence is masked to obtain the second concept behavior sequence.

6. The interpretable sequence recommendation method that integrates concepts and behaviors according to claim 1, characterized in that, The step of performing sequence recommendations for the user based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix, and the concept behavior sequence set to obtain interpretable sequence recommendation results includes: Based on the historical behavior sequence and the concept behavior sequence set, an interpretable recommendation model is used to obtain a sequence recommendation result set; Based on the sequence recommendation result set, the historical behavior sequence, the concept behavior sequence set, the concept embedding matrix, and the concept weight matrix, the interpretable sequence recommendation result is obtained using the interpretable recommendation model.

7. The interpretable sequence recommendation method that integrates concepts and behaviors according to claim 6, characterized in that, The step of obtaining a sequence recommendation result set based on the historical behavior sequence and the concept behavior sequence set using an interpretable recommendation model includes: Based on the historical behavior sequence, the first sequence recommendation result is obtained using the interpretable recommendation model; Based on the first behavior sequence of the concept behavior sequence set, the second sequence recommendation result is obtained using the interpretable recommendation model; Based on the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence of the concept behavior sequence set, the third sequence recommendation result is obtained using the interpretable recommendation model; Based on the first concept behavior sequence of the concept behavior sequence set, the fourth sequence recommendation result is obtained using the interpretable recommendation model; Based on the second concept behavior sequence of the concept behavior sequence set, the fifth sequence recommendation result is obtained using the interpretable recommendation model; The first sequence recommendation result, the second sequence recommendation result, the third sequence recommendation result, the fourth sequence recommendation result, and the fifth sequence recommendation result are used as the sequence recommendation result set.

8. The interpretable sequence recommendation method that integrates concepts and behaviors according to claim 6, characterized in that, The explainable recommendation model includes a counterfactual explanation model; the optimization method for the counterfactual explanation model includes a contrastive learning method.

9. An interpretable sequence recommendation system that integrates concepts and behaviors, characterized in that, include: The data acquisition module is used to acquire the concept library and the user's historical behavior sequences; The concept embedding module is used to obtain a historical concept sequence and a concept embedding matrix based on the historical behavior sequence and the concept library; The concept and behavior association module is used to obtain a concept weight matrix and a concept behavior sequence set based on the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the concept and behavior association strategy. An interpretable sequence recommendation module is used to perform sequence recommendations for the user based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix, and the concept behavior sequence set, to obtain an interpretable sequence recommendation result.

10. An interpretable sequence recommendation device that integrates concepts and behaviors, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the interpretable sequence recommendation method that integrates concepts and behaviors as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Sequence recommendation method and device based on hypergraph and local attention enhancement

    CN117807309A

  • Automatic decoupling sequence recommendation method based on large language model

    CN118410244A

Cited By

  • Explainable recommendation method based on user preference similarity and concept prerequisite relationship

    CN122470760A