System and method for next basket recommendation through dynamic attribute modeling

The neural network framework addresses the limitations of existing systems by modeling dynamic user and item attributes with time-aware encoding and self-attention, enhancing the accuracy of next-basket recommendations.

JP7559215B2Active Publication Date: 2024-10-01SALESFORCE INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023506488
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-04
Filing Date
2021-07-29
Publication Date
2024-10-01
Estimated Expiration
2041-07-29

AI Technical Summary

Technical Problem

Existing sequential recommendation systems fail to consider dynamic attributes of users and items, leading to inaccurate and irrelevant recommendations over time, as they ignore time-varying user interests and item characteristics, and do not effectively model intra-basket correlations and higher-order feature interactions.

Method used

A neural network framework that models dynamic attributes with item and feature interactions using an attentive network, incorporating time-aware encoding, temporal level attention, and self-attention mechanisms to capture seasonal patterns and higher-order feature interactions.

Benefits of technology

The framework significantly improves recommendation accuracy by capturing temporal sequential patterns and intra-basket correlations, resulting in more precise next-basket predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007559215000063
    Figure 0007559215000063
  • Figure 0007559215000064
    Figure 0007559215000064
  • Figure 0007559215000065
    Figure 0007559215000065
Patent Text Reader

Abstract

The embodiments described herein provide an attentive network framework that models dynamic attributes with item and feature interactions. Specifically, the attentive network framework first encodes basket item sequences and dynamic attribute sequences with time-aware padding and time / month encoding to capture seasonal patterns (e.g., in app recommendation, outdoor activity apps are more suitable for summer, while indoor activity apps are more suitable for winter). Then, the attentive network framework applies a time-level attention module to the basket item sequences and dynamic user attribute sequences to capture temporal sequential patterns per basket item and per attribute. After that, an intra-basket attention module is used for the items in each basket to capture correlation information between items.
Need to check novelty before this filing date? Find Prior Art

Description

Related Technology

[0001] This disclosure claims priority to U.S. Patent Application No. 17 / 112,765, filed December 4, 2020, which is a non-provisional application and claims priority to Indian Provisional Application No. 202041035500, filed August 18, 2020, which are expressly incorporated by reference herein in their entireties.

[0002] The present disclosure relates generally to machine learning models and neural networks, and more specifically to next basket recommendation using high-level features and dynamic attribute modeling of interactions. [Background technology]

[0003] Sequential recommendation has been widely applied in various applications, such as product recommendation, video recommendation, and music recommendation in e-commerce websites. In a sequential recommendation setting, a user has a sequence of historical interactions (e.g., clicks, purchases) with different items. A recommendation mechanism predicts successive items according to the user's historical behavior. For example, by modeling sequential patterns from historical interactions, a sequential recommendation mechanism recommends items that the user is likely to interact with in the next time step. Existing sequential recommendation systems only consider the interacted items of a user's history and ignore the attributes of the items or the user. Thus, recommendations made by existing systems that ignore the attributes of the items or the user themselves can sometimes be highly inaccurate or even irrelevant, leading to an unsatisfactory user experience. [Brief description of the drawings]

[0004] [Figure 1] FIG. 1 shows a block diagram illustrating an example recommendation system that models dynamic attributes with item and feature interactions, according to embodiments described herein.

[0005] [Figure 2A] 2 is a block diagram illustrating an example architecture of the recommendation module in FIG. 1 according to one embodiment. [Figure 2B] FIG. 2B is a block diagram providing a detailed structure of the modules shown in FIG. 2A, according to one embodiment.

[0006] [Diagram 3] 1 provides a simplified block diagram illustrating an example operation of a multi-head self-attention block (MHSAB) according to embodiments described herein.

[0007] [Figure 4] 1 provides a simplified block diagram illustrating an example architecture of an MHSAB according to embodiments described herein.

[0008] [Diagram 5] FIG. 2 is a simplified diagram of a computing device for implementing a recommendation system that models dynamic attributes with item and feature interactions as described throughout the disclosure, according to some embodiments.

[0009] [Figure 6] 1 is a simplified logic flow diagram illustrating a method for next basket recommendations using dynamic attributes of items, according to certain embodiments described herein.

[0010] [Figure 7] 1 provides tabular summary statistics of an exemplary training dataset for the recommendation module 130 according to one embodiment described herein.

[0011] [Figure 8] A table is provided showing overall results compared to seven baseline approaches, according to one embodiment described herein.

[0012] [Figure 9] 1 provides a table showing ablation studies of a recommendation module according to one embodiment described herein.

[0013] [Figure 10] 1 provides a visualization view of average temporal levels and intra-attribute attention weights for an exemplary training dataset, according to one embodiment described herein.

[0014] In the figures and appendices, elements having the same designation have the same or similar functions. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] Most of the existing sequential recommendation systems only consider the interacted items in a user's history and ignore the attributes of the items or users. In particular, recommendations that ignore the dynamic attributes of items or users may be highly inaccurate over time, since the interests of users and / or the attributes of items may change over time.

[0016] Some existing systems may incorporate static item attributes, e.g., product category and brand, to improve recommendation performance. However, for many applications, there are also dynamic user and item attributes that change over time. Such attributes provide important explanations for either shifts in user interests or changes in item characteristics. For example, in an application recommendation setting, there are dynamic attributes such as the amount of time a user spends on different applications, which may vary from day to day and provide information about the user's preferences and needs for different applications. As another example, in a workout recommendation setting, the user's altitude, speed, and heart rate are relevant information that may change over time. Furthermore, in sequential recommendations, there are often seasonal patterns. As a specific example, a user who purchased a gift card in the last New Year is likely to purchase a gift card in the next New Year. As another example, swimsuits may be popular during the summer season.

[0017] In some embodiments, sequential recommendations may be made in the form of next basket recommendations where a user may interact with multiple items at each time step. For example, when ordering one meal online, multiple items may be purchased in the same shopping cart or different dishes may be ordered. Some existing systems may mine sequence patterns between a series of basket items. However, the relationship between items in the same basket may also provide useful information. Thus, modeling sequential patterns (e.g., buying a phone and then buying a phone case) and relationships between items in the same basket (e.g., bread and butter are usually purchased together) are both important to understand the relationships between items. As a specific example, some items (e.g., bread and butter) are usually purchased together. To capture the relationships between items in the same basket, some existing systems use a correlation matrix based on the frequency of items co-occurring in the basket and then incorporate it into the modeling, however, it treats the correlation between items as static information rather than dynamically learned.

[0018] In addition to item interactions, higher-order interactions between different features are another important aspect to improve recommendation performance. As a concrete example, the movie "Frozen" may be recommended to a 10-year-old girl. The tertiary features (gender: female, age: 10 years old, genre: animation) provide useful information for this recommendation. It remains challenging to automatically learn such higher-order feature interactions without relying on manual engineering by domain experts.

[0019] Therefore, in view of the need to provide sequential recommendations that capture the user's temporal transaction patterns and intra-basket correlations from the user's historical interacted items, as well as the implicit dynamic apatites and higher-order feature interactions from dynamic user / item attributes, the embodiments described herein provide an attentional network framework that models dynamic attributes with item and feature interactions. Specifically, the attentional network framework first encodes basket item sequences and dynamic attribute sequences with time-aware padding and time / month encoding to capture seasonal patterns (e.g., in app recommendations, outdoor activity apps are more suitable for summer periods, while indoor activity apps are more suitable for winter periods). Then, the attentional network framework applies a time-level attention module to the basket item sequences and dynamic user attribute sequences to capture the temporal sequential patterns per basket item and per attribute. After that, an intra-basket attentional module is used for the items in each basket to capture the correlation information between items. Using self-attention, the interactions between items are adaptively learned during model training. A self-attention module can also be leveraged on the attributes of each time step to generate higher-order feature interactions.

[0020] As used herein, the term "network" may include any artificial intelligence network or system, neural network or system, and / or any hardware or software-based framework including any training or learning model implemented therein or in conjunction therewith.

[0021] As used herein, the term "module" may include a hardware or software-based framework that performs one or more functions. In some embodiments, a module may be implemented on one or more neural networks.

[0022] 1 shows a block diagram illustrating an example recommendation system that models dynamic attributes with item and feature interactions according to embodiments described herein. Fig. 100 shows a recommendation system 130 that receives dynamic attributes 113a-113n for a user 110, dynamic attributes 114a-114n for basket items 112, time awareness factors 116, etc.

[0023] For example, user dynamic attributes 113a-113n may include attributes indicative of time-varying or dynamic attributes of a user, such as age, location, use of applications on a user device, seasonal interests, etc. Time-aware factors 116 may include time of year, trends (e.g., movies in theaters at a particular time, etc.), etc. Historical basket dynamic attributes 114a-114n may include basket item attributes, dynamic combinations of basket items (e.g., item A is often combined with item B at a particular time, or with item C at a different time, etc.), etc.

[0024] The recommendation system 130 may learn from historical interactions between users and items, as well as from the dynamic attributes 113a-113n of the users and the dynamic attributes of the items 114a-114n, to recommend the next item 125. Specifically, the recommendation system 130 may obtain information about a set of users U having a total number of users |U|, and a set of items V having a total number of items |V|. A user or an item has a set of attributes, denoted F, with a total number of attributes |F|. Any user may obtain information about

number

number

number

number

number

number

number

number

[0025] FIG. 2A is a block diagram illustrating an exemplary architecture of the recommendation module in FIG. 1 according to one embodiment, and FIG. 2B is a block diagram providing a detailed structure of the modules shown in FIG. 2A according to one embodiment. FIG. 200a shows an attention network framework for modeling dynamic attributes with item and feature interactions. The framework may include an input encoder (231a and 231b, or collectively referred to as 231), a temporal level attention module (232a and 232b, or collectively referred to as 232), an intro basket module 233 and an intra attribute module 234, and a prediction module 235.

[0026] The input encoder 231 receives and encodes the sparse representation of the basket item sequence 203 and / or categorical dynamic attribute sequence 204 into a dense representation and normalizes the numerical dynamic attributes. Specifically, at each time step, the best item sequence

number

number

[0027] The input encoder 231a receives each basket item sequence in the basket item sequence 203.

number

number

number

number

number

number

number

number

number

number

number

number

[0028] Similarly, for the dynamic user attributes in the dynamic attribute sequence 204, categorical attributes and numerical attributes are modeled differently.

number

number

number

number

number

number

number

[0029] In one embodiment, since the sequence length of the basket sequence and the user attributes varies for different users, the maximum sequence length is set as T to reach the latest T time steps of information. If the sequence length is greater than T, the sequence is truncated to the latest T time steps of information. If the sequence length is less than T, a zero pad operation may be applied to the empty positions. Instead of padding zeros at the beginning of the sequence until the sequence length is T, the input encoder 231 pads the missing time steps with zeros. For example, for two sequences from months {month 1, month 2, month 3} and months {month 1, month 3, month 5}, the maximum sequence length is 5. When padding at the beginning, the time shift information is ignored. Instead, zeros are padded at the end of the sequence (representing months 4 and 5) for the first sequence, and zeros are filled before months 3 and 5 (representing months 2 and 4) for the second sequence. This padding operation allows the model to distinguish the difference between these two sequences. After padding,

number

[0030] However, padding techniques may result in longer sequences as input data when compared to approaches without padding. In practice, however, the duration of each time step (basket) depends on the application. For example, for efficient training, a basket is processed every day when the training data contains about 4 months of data. Training per hour or per minute as a basket may produce only sparse information for each basket.

[0031] In one embodiment, the input encoder 231 performs position embedding.

number

number

number

number

number

[0032] Similarly, in the input encoder 231b, the position index embedding 222 and the month index embedding 222 are

number

number

[0033] The time-level attention modules 232a-b are applied separately to the encoded basket sequence and the user attribute sequence to capture both the users' sequential trading patterns and their implicit dynamic apatites. v , L Fcat , and L Fnum Instead of taking a weighted sum of all the item representations in the basket and all the attribute values ​​at each time, the tensor representation is shaped into a 2D matrix:

number

[0034] The temporal level attention modules 232a-232b each include a number of multi-head self-attention modules (MHSABs), which are implemented using a 2D matrix L v , L Fcat , and L Fnum to separately capture the time-level sequential patterns. For example, FIG. 3 provides a simplified block diagram illustrating an example architecture of the MHSAB according to an embodiment described herein. Specifically, the attention block can be described as mapping a set of (key)-(value) pairs of (query) 304, 306, and 308 to an output 315. In the MHSA block, the query 304, key 306, and value 308 are the same and are projected into multiple subspaces with different learned projection matrices. Here, the query 304, key 306, and value 308 are first projected into L (0) is projected from the input 302 (L (0)= L, either the tensor representation from the input encoder 231). The projected query 304 and the projected key 306 are then multiplied to yield a representation 310, which is then applied to the projected values ​​308 to obtain the self-attention output 315.

[0035] 4 provides a simplified block diagram illustrating an example architecture of an MHSAB 400 according to embodiments described herein. The MHASB 400 includes an MHSA 316 (operating similarly to diagram 300 of FIG. 3), a normalization layer 331, a two-layer feed-forward neural network (FFNN) 332, and another normalization layer 333. The MHSA 316 receives input 302 to multiple parallel self-attention (SA) blocks 320a-h, and the outputs from each SA block are concatenated to form an output 318 as follows:

number

number

[0036] In one embodiment, since the sequence is chronological, the model may only consider information up to t time steps when making a prediction for t+1 time step. To avoid the attention module from looking into future step information, a causality mask is added to the MHSA block to suppress queries when j>i. i and key j may prohibit all links between

[0037] In one embodiment, to enhance the performance of representation learning of the self-attention block, the functions of a two-layer fully connected layer with residual connections, dropout, layer normalization, and ReLU activation may be applied to the MHSA output 318 as follows:

number

[0038] Thus, the output 325 from the entire MHSAB may be obtained as follows:

number

[0039] Multiple (k>1) MHSABs shown in FIG. 4 may be stacked as follows to capture more complex feature interactions:

number

[0040] 2, the in-basket module 233 and the in-attribute attention module 234 are used to extract item interaction information and feature interaction information, respectively. Each of the in-basket module 233 and the in-attribute attention module 234 may include one or more stacks of MHSABs, and each stack of MHSABs includes one or more sequence-connected MHSABs. The MHSABs may be similar to block 400 shown in FIG. 4.

[0041] Specifically, it is proved that the interaction information between basket items is useful for improving the next basket recommendation result. Additionally, it is shown that higher-order feature interactions also improve the prediction results. Therefore, MHSAB is applied to the basket and dynamic attributes at each time step t. This enables the model to mine the interactions between basket items and generate higher-order feature interactions that can help the model make better recommendations.

[0042] For example, for a sequence of categorical attributes, the in-basket module 233 or the in-attribute module 234 may generate an output representation matrix

number

number

number

number

[0043] Therefore, at time t, the interactions between the categorical attributes

number

number

number

number

[0044] The prediction module 235 receives the output from the in-basket module 233 and the in-attribute attention module 234.

number

number

number

[0045] The prediction module 235 receives from the input encoder 231a a shared embedding table 230, e.g., item embedding matrix Q, which provides a candidate item list, which is then used to predict the basket items for time step t+1. Specifically, the relevance of items is predicted as follows:

number

number

[0046] Referring to FIG. 2A, during the training phase, the output r from the prediction module 235 i,t is then sent to the loss module 260 to compute the binary entropy loss as follows:

number

number

number

[0047] FIG. 5 is a simplified diagram of a computing device 500 for implementing a recommendation system that models dynamic attributes with item and feature interactions as described throughout the disclosure, according to some embodiments. As shown in FIG. 5, the computing device 500 includes a processor 510 coupled to a memory 520. The operation of the computing device 500 is controlled by the processor 510. Also, while the computing device 500 is shown with only one processor 510, it is understood that the processor 510 may be representative of one or more central processing units, multi-core processors, microprocessors, microcontrollers, digital signal processors, field programmable gate arrays (FPGAs), application specific integrated circuits, graphic processing units (GPUs), and the like, within the computing device 500. The computing device 500 may be implemented as a standalone subsystem, as a board added to a computing device, and / or as a virtual machine.

[0048] The memory 520 may be used to store software executed by the computing device 500 and / or one or more data structures used during operation of the computing device 500. The memory 520 may include one or more types of machine-readable media. Some common forms of machine-readable media may include, for example, a floppy disk, a flexible disk, a hard disk, a magnetic tape, any other magnetic medium, a CD-ROM, any other optical medium, punch cards, paper tape, any other physical medium with a pattern of holes, a RAM, a PROM, an EPROM, a FLASH-EPROM, any other memory chip or cartridge, and / or any other medium adapted to be read by a processor or a computer.

[0049] The processor 510 and / or memory 520 may be located in any suitable physical location. In some embodiments, the processor 510 and / or memory 520 may be implemented on the same board, the same package (e.g., a system in package), the same chip (e.g., a system on a chip), etc. In some embodiments, the processor 510 and / or memory 520 may comprise distributed, virtualized, and / or containerized computing resources. Consistent with such embodiments, the processor 510 and / or memory 520 may be located in one or more data centers and / or cloud computing facilities.

[0050] In some examples, the memory 520 may include a non-transitory tangible machine-readable medium including executable code that, when operated by one or more processors (e.g., processor 510), may cause the one or more processors to perform the methods described in further detail herein. For example, as shown, the memory 520 includes instructions for the recommendation module 130 that may be used to implement and / or emulate the systems and models and / or to implement any of the methods described further herein. In some examples, the recommendation module 130 may receive an input 540, e.g., a sequence of baskets representing a user's item interaction records sorted by time. The data interface 515 may be either a user interface that receives input entered by a user or a communication interface that may receive or retrieve a data sequence from a database. The recommendation module 130 may generate an output 550, e.g., a next recommended item given the first sequence of basket items and the dynamic user attributes.

[0051] In some embodiments, the recommendation module 130 includes an encoder 231, a time level attention module 232, one or more in-basket and in-attribute self-attention modules 233, and a prediction module 234. Modules 231-234 are further illustrated in Figures 2A-2B.

[0052] The architecture of the recommendation module 130 for implementing the sub-modules 231-234 may be similar to that of diagrams 200a-b in Figures 2A-2B. In some examples, the recommendation module 130 and the sub-modules 231-234 may be implemented using hardware, software, and / or a combination of hardware and software.

[0053] 6 is a simplified logic flow diagram illustrating a method for next basket recommendation using dynamic attributes of items, according to some embodiments described herein. One or more of the processes 610-650 of the method 600 may be implemented, at least in part, in the form of executable code stored on a non-transitory tangible machine-readable medium that, when executed by one or more processors, may cause the one or more processors to perform one or more of the processes 610-650. In some embodiments, the method 600 may correspond to a method used by the recommendation module 130.

[0054] In process 610, a sequence of past basket inputs (e.g., 203 in FIGS. 2A-2B) and a sequence of dynamic user attributes (e.g., 204 in FIGS. 2A-2B) are received. For example, the sequence of past basket inputs represents a user's item interaction records sorted by time.

[0055] In process 620, the input sequence of historical baskets and the input sequence of dynamic attributes are converted into a dense representation, e.g.

number

[0056] In process 630, time-level attention is applied to the dense representation to capture both the user's sequential trading patterns and the implicit dynamic apatites, e.g., a time-level attention matrix

number

[0057] In process 640, item interaction information and feature interaction information are extracted from the attended dense representation. For example, stacks of MHSABs are applied in parallel to the time-level attention matrices corresponding to baskets and dynamic attributes at each time step, so as to extract correlations between basket items and generate higher-order feature cross-correlations for better recommendations. The resulting basket attention matrix and attribute attention matrix are

number

[0058] In process 650, a next recommendation prediction is generated based on the basket item attention matrix and the attribute attention matrix, representing the extracted item interaction information and feature interaction information. Further details regarding generating the next recommendation prediction are described in connection with the prediction module 235 of FIGS. 2A-2B. Exemplary Performance

[0059] FIG. 7 provides a tabular summary statistic of an exemplary training dataset for the recommendation module 130 according to one embodiment described herein. The dataset shown in FIG. 7 represents a diverse set of domains with different numbers of users, items, and attributes. The Enterprise Product Recommendation (EPR) dataset is a private dataset sampled from a major enterprise cloud platform. The task is to recommend products to enterprises. It contains 24 months (January 2017-December 2018) of enterprise customer product purchase records and 161 dynamic user attributes. Examples of dynamic attributes are enterprise product usage metrics, website behavior metrics, sales information, and enterprise marketing activities.

[0060] The Santander Product Recommendation (SPR) 1 dataset is a public dataset for Santander Bank's product recommendations. It contains 18 months of user purchase information and user attributes. Dynamic attributes are also included. For example, "indrel_1mes" represents the customer type, such as primary customer, potential customer, etc. It can change from one type to another every month. "antiguedad" represents the seniority of the customer in months.

[0061] The Ta-Feng dataset is a grocery shopping dataset that contains transactions from November 2000 to February 2001. Each transaction is an item purchased in a basket. Additionally, five attributes are also provided (e.g., AGE_GROUP). Although it does not include dynamic attributes, the recommendation approach described herein is still valid for modeling the time patterns of basket item sequences, higher order item interactions, and higher order attribute interactions that users interact with.

[0062] Specifically, for each user u, the top K items in the ranking list of all items are selected for the next basket recommendation. Time steps up to time step t are used when making predictions for time step t+1. For the EPR dataset, the first 20 months of data are used as the training set, and the 21st month of data is used as the validation data for tuning the model. For testing, the best parameters are used to train on the first 21 months of data. The consecutive 3 months of data (months 22-24) are treated as the test set. For the SPR dataset, for attributes with missing values, the most common values ​​of categorical attributes and the average value of numerical attributes are filled. The first 17 months of data are used as training data. The data is first split into 80% and 20% training and validation for model tuning, and then train on all training data. Evaluation is performed on the 18th month of data. For the Ta-Feng dataset, users with less than 10 purchases and items with less than 10 purchases are removed. The first 3 months of data are used as the training set, and the next 0.5 months of data are used as validation data to tune the model. The model is trained on the first 3.5 months of data. Note that the Ta-Feng dataset contains 4 months of data, but the time pattern contains a weekday / weekend pattern rather than a seasonal pattern.

[0063] Evaluation metrics such as Hit Rate (HR@K), Normalized Discounted Cumulative Gain (NDCG@K), and Mean Average Precision (MAP@K) are used for the EPR and Ta-Feng datasets. The choices of K in terms of MAP are 23 for EPR and 7691 for Ta-Feng (all items). Additionally, F1@5 and F1@10 are used as evaluation metrics for the Ta-Feng dataset. For the SPR dataset, Kaggle challenge and MAP@7 are used for evaluation. Since the Kaggle submission only provides MAP@7 for the test set, this is the only metric reported for this dataset.

[0064] The following baseline methods are adopted for comparison: FMC, which applies Markov chains on a coefficientized item transition matrix; FPMC, which combines matrix coefficientization with coefficientized first-order Markov chains to capture users' long-term preferences and inter-item interactions; and SASRec, a self-attention based model for sequential recommendation. The model takes user action sequences as input and applies self-attention in the time domain to capture user action patterns to predict the next item. For a fair comparison, multi-heads are used to enhance the performance. Additional baseline models include BERT4Rec, which uses bidirectional self-attention to model user action sequences with Cloze adopted for sequential recommendation; DREAM, an RNN-based model in which basket representations are aggregated by item embeddings through a pooling operation, which uses the latest basket representation to generate the next basket item; Beacon, an RNN-based model that encodes basket sequences while considering intra-basket (item within basket) interactions; and FDSA+, an extension of the FDSA method in which vanilla attention is used on basket items at each time step and the loss function is updated in a similar manner to the loss module 260.

[0065] For all baseline methods, if they face the cold start problem (e.g., when a user has no interaction history), a recommendation list is provided to these users based on the popular items in the dataset. Because the original SASRec and BERT4Rec cannot handle basket item sequences by design, additional data preparation may be performed for these models. Each basket item sequence is flattened except for the last basket, and the last basket item is used as the label to generate training samples for each user.

[0066] The AdamOptimizer is used to update the network with moment estimates β1=0.9 and β2=0.999. The self-attention layer is tuned from {1,2,4} and the head number of each attention block is tuned from {1,2,4,6}. The maximum sequence length is set to 12 for the EPR dataset, 16 for the SPR dataset and 30 for the Ta-Feng dataset. All models are trained from scratch on a single NVIDIA Tesla K80 with a batch size of 256.

[0067] FIG. 8 provides a table showing overall results compared to seven baseline approaches, according to one embodiment described herein. The recommendation module 130 described herein significantly outperforms all baselines in all metrics. The relative improvement ranges from 3.92% to 29.63%. This demonstrates the effectiveness of the recommendation module 130. Among the baseline approaches, the approaches developed for next basket recommendation (DREAM, Beacon) outperform the approaches for general sequence recommendation (FMC, FPMC, SASRec, Bert4Rec). Among the baselines, FDSA+ performs best on the EPR and SPR debaselines, while Beacon performs best on the Ta-Feng dataset. The main reason is that FDSA+ leverages attribute information, which EPR and SPR have more attributes compared to Ta-Feng. For the SPR dataset, the top model in the Kaggle challenge achieves 0.0314 in MAP@7. However, applying heavy handcraft feature engineering (by Kaggle forum) to come up with 100+ solutions, which are too time consuming and too dataset specific, and ensembling multiple classifiers to boost performance. All these tricks can be applied to the recommendation module 130.

[0068] To understand the impact of the different components 231a-b, 232a-b, 233, 234 and 235 of the recommendation module 130, a detailed ablation study was performed using the EPR dataset. To understand the impact of the different components, a detailed ablation study was performed using the EPR dataset of FIG.

[0069] Figure 10 provides a visualization view of the average time-level and intra-attribute attention weights for the SPR dataset. To gain insight into how attention captures meaningful patterns, sampled time-level attention weights and intra-attribute attention weights on sequences from the SPR dataset are shown in Figure 10. Four representative heatmaps are shown at different layers and heads given the input sequence, where (a) and (b) are the attention weights from two different layers (layer 1 and layer 4) of the time-level basket attention, and (c) and (d) are from two different heads of the first intra-attribute layer. In (a) and (b), the x-axis is the position index in the basket sequence and the y-axis is the time step. For example, in the row at 16 months, the time-level attention module considers baskets with position index up to 16 months. From (a) and (b), we can see that attention varies at different layers. The weights in layer 4 are more heavily weighted towards recent items, while the weights in layer 1 are more evenly attended to all previous history. This shows the advantage of stacking more layers to capture different temporal patterns. In (c) and (d), each grid in the figure represents the interaction between two input features. From (c) and (d), we observe that the attention weights vary across different heads and the module captures meaningful feature interactions. For example, in (c), position (11,1) (marked with a red square) corresponding to the interaction feature value <“Foreigner index”: NO,“Customer's Country residence”: ES> is meaningful because the bank is based in Spain and the customers who actually live in Spain are not foreigners. In (d), position (9,5) corresponds to the interaction feature value <“Customer relation type”: active, “New customer Index”: 1>. This is also meaningful because new and active customers are often highly correlated. These observations exemplify the usefulness of multi-head attention.

[0070] Some examples of computing devices, such as computing device 200, may include a non-transitory, tangible, machine-readable medium that includes executable code that, when run by one or more processors (e.g., processor 210), may cause the one or more processors to perform the process of method 400. Some common forms of machine-readable media that may include the process of method 400 are, for example, a floppy disk, a flexible disk, a hard disk, a magnetic tape, any other magnetic medium, a CD-ROM, any other optical medium, a punch card, a paper tape, any other physical medium having a pattern of holes, a RAM, a PROM, an EPROM, a FLASH-EPROM, any other memory chip or cartridge, and / or any other medium adapted to be read by a processor or a computer.

[0071] This description and the accompanying drawings illustrating aspects, embodiments, implementations, or applications of the invention should not be construed as limiting. Various mechanical, compositional, structural, electrical, and operational changes may be made without departing from the spirit and scope of this description and claims. In some instances, well-known circuits, structures, or techniques have not been shown or described in detail so as not to obscure the embodiments of the present disclosure. Similar numbers in two or more figures represent the same or similar elements.

[0072] In this description, certain details are set forth that describe some embodiments that are not inconsistent with the present disclosure. Numerous details are set forth to provide a thorough understanding of the embodiments. It will be apparent to one skilled in the art that some embodiments may be practiced without some or all of these specific details. The specific embodiments disclosed herein are meant to be illustrative, but not limiting. One skilled in the art may recognize other elements that are not specifically described herein but are within the scope and spirit of the present disclosure. Additionally, to avoid unnecessary repetition, one or more features shown and described in connection with one embodiment may be incorporated in other embodiments, unless otherwise specifically described or one or more features render one embodiment non-functional.

[0073] Although exemplary embodiments have been shown and described, a wide range of modifications, changes, and substitutions are contemplated in the foregoing disclosure, and in some instances, some features of the embodiments may be used without the corresponding use of other features. Those skilled in the art will recognize many variations, alternatives, and modifications. Accordingly, the scope of the present invention should be limited only by the scope of the claims that follow, and it is appropriate that the claims be interpreted broadly in a manner consistent with the scope of the embodiments disclosed herein.

Claims

1. 1. A system for next basket recommendation using dynamic attributes of items, comprising: a communications interface for receiving basket items that a user has interacted with and dynamic attributes associated with said user; a memory storing a plurality of computer executable instructions; Reading and executing the plurality of computer-executable instructions, encoding, by an input encoder, a basket item sequence indicative of items in the basket into a first dense representation vector and a dynamic attribute sequence indicative of the dynamic attributes into a second dense representation vector; applying self-attention, by a time level attention module implemented through at least a first neural network, to the first dense representation vector to result in a first time level attention matrix indicative of a time level sequential pattern of items in the basket, and applying self-attention to the second dense representation vector to result in a second time level attention matrix indicative of a time level sequential pattern of the dynamic attributes of the user; applying attention, by an intra-basket attention module, to the first time-level attention matrix to result in a basket item attention matrix indicative of feature interactions between items in the basket; applying attention, by an intra-attribute attention module, to the second time-level attention matrix to result in an attribute attention matrix indicative of interactions between the dynamic attributes; and generating, by a prediction module, a predicted set of basket items for a next time step based on the basket item attention matrix and the attribute attention matrix.

2. the input encoder is configured to encode each multi-hot representation vector corresponding to each basket item in the sequence of basket items or each attribute in the sequence of dynamic attributes into a basket item latent representation or an attribute latent representation, respectively; The system of claim 1 , wherein the attribute latent representation corresponds to a categorical attribute or a numerical attribute.

3. The input encoder comprises: Generate a location embedding vector and a month embedding vector; The system of claim 2 , further configured to generate a basket representation, or a categorical attribute representation and a numerical attribute representation, by adding the location embedding vector and the month embedding vector to the basket item latent representation or the attribute latent representation.

4. The input encoder comprises:

2. The system of claim 1, configured to perform a time-aware padding operation on the basket item sequence and the dynamic attribute sequence by padding empty positions of the basket item sequence or the dynamic attribute sequence with zeros when the corresponding sequence length is shorter than a preset maximum sequence length.

5. The system of claim 1 , wherein the temporal level attention module comprises one or more stacked multi-headed self-attention blocks (MHSABs).

6. The first MHSAB from the temporal level attention module: projecting a basket representation, a categorical attribute representation, or a numerical attribute representation from an input encoder onto queries, keys, and values; The system of claim 1 configured to link multiple heads from the projections.

7. The system of claim 6 , wherein the first MHSAB feeds the concatenated heads into a two-layer fully connected layer with layer normalization and ReLu activation.

8. The system of claim 1 , wherein the in-basket attention module or the in-attribute attention module includes a stack of multiple MHSABs.

9. the prediction module includes a feedforward neural network; concatenating the basket item attention matrix from the within-basket attention module and the attribute attention matrix from the within-attribute attention module; The system of claim 1 , further configured to generate, by the feedforward neural network, a recommendation score for each item based on the concatenated matrix.

10. The system of claim 9 , further comprising a loss computing module configured to compute a binary cross-entropy loss based on a sigmoid function of the recommendation scores.

11. 1. A computer-implemented method for next basket recommendation using dynamic attributes of items, comprising: receiving, via a communications interface, items in a basket that a user has interacted with and dynamic attributes associated with said user; encoding, by an input encoder, a basket item sequence indicative of items in the basket into a first dense representation vector and a dynamic attribute sequence indicative of the dynamic attributes into a second dense representation vector; applying self-attention, by a time level attention module implemented through at least a first neural network, to the first dense representation vector to result in a first time level attention matrix indicative of a time level sequential pattern of items in the basket, and applying self-attention to the second dense representation vector to result in a second time level attention matrix indicative of a time level sequential pattern of the dynamic attributes of the user; applying attention to the first time level attention matrix to result in a basket item attention matrix indicative of feature interactions between items in the basket; applying attention to the second time-level attention matrix to result in an attribute attention matrix indicative of interactions between the dynamic attributes; generating a set of predicted basket items for a next time step based on the basket item attention matrix and the attribute attention matrix.

Citation Information

Patent Citations

  • Personalized products recommendation using deep learning

    JP2018181326A

  • Sales prediction and recommendation system

    US20120278091A1

  • Providing Personalized Item Recommendations Using Scalable Matrix Factorization With Randomness

    US20150052003A1