{'fraction_non_alphanumeric': 0.02396234488660676, 'fraction_numerical': 0.0, 'mean_word_length': 5.757225433526012, '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}}
ARERec: Attentive Local Interaction Model for Sequential Recommendation

Previous sequential-recommendation methods have been able to capture patterns of item characteristics that interact with the user. However, they modeled user behavior using a whole interaction sequence, despite possible changes in a user’s behavior over time, which can make some behaviors no longer relevant by the end of the user–item interaction period. That is, each item representation was derived from the influences of all items in the whole sequence (i.e. global representation) without considering item-adjacency factors that can affect the item characteristics during the interaction period (i.e. local representation). Furthermore, these methods modeled only user behavior, ignoring item behavior, which can involve patterns of user characteristics for users who interact with the item. In this paper, we therefore propose a novel attentive local-interaction model for sequential recommendation called ARERec, which applies a region-embedding technique to both user and item historical sequences. The aim is to model user and item behavior over the user–item interaction sequence while considering local representations that contain specific characteristics of both user and item in the sequence. In this way, information is derived for corresponding periods that reflect more-specific reasons behind the interaction in the sequence. Moreover, to account for ratings and neighbor-related factors, we adopt the concept of neighbor-based collaborative filtering in our predictions. One issue is that neighbors have the same similarity levels for all users, resulting in similar predictions, even though there may be different user-specific information. To address this problem, we apply a multi-head attention mechanism to personalize each neighbor based on the user’s characteristics. Extensive experiments on three datasets demonstrate that ARERec consistently outperforms state-of-the-art sequential methods, including Recurrent Neural Networks and the attention-based methods (both unidirectional and bidirectional) HitRate and Normalized Discounted Cumulative Gain. Our experiments also show that ARERec provides superior results by considering interaction periods with local representation rather than the whole sequence using global representation.