{'fraction_non_alphanumeric': 0.026656511805026657, 'fraction_numerical': 0.0, 'mean_word_length': 5.169014084507042, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Sequence-Aware Recommendation with Long-Term and Short-Term Attention Memory Networks

Next item recommendation is an important yet challenging task in real-world applications such as E-commerce. Since people often carry out a series of online shopping activities, in order to predict what a user may purchase next, it is essential to model the user's general taste as well as the sequential correlation between purchases. Existing models combine these two factors directly without considering the dynamic changes of a user's long-term and short-term preferences. Meanwhile, when a purchase session contains multiple items, not all of them have the same impact on the next item to purchase. To address these limitations, we propose a model that introduces hierarchical attention to dynamically balance between general taste (long-term preference) and sequential behavior (short-term preference). To weight individual items in the same session, we design a neural memory network with attention mechanism to learn the dynamic weights. Our model can adapt the embedding of each session as well as the embedding of long-term and short-term preferences. Extensive experiments on three real-world datasets show that our model significantly outperforms state-of-the-art methods based on commonly used evaluation metrics.