Enhancing Time Awareness in Generative Recommendation (2025)

Abstract: Generative recommendation has emerged as a promising paradigm that formulates the recommendations into a text-to-text generation task, harnessing the vast knowledge of large language models. However, existing studies focus on considering the sequential order of items and neglect to handle the temporal dynamics across items, which can imply evolving user preferences. To address this limitation, we propose a novel model, Generative Recommender Using Time awareness (GRUT), effectively capturing hidden user preferences via various temporal signals. We first introduce Time-aware Prompting, consisting of two key contexts. The user-level temporal context models personalized temporal patterns across timestamps and time intervals, while the item-level transition context provides transition patterns across users. We also devise Trend-aware Inference, a training-free method that enhances rankings by incorporating trend information about items with generation likelihood. Extensive experiments demonstrate that GRUT outperforms state-of-the-art models, with gains of up to 15.4% and 14.3% in Recall@5 and NDCG@5 across four benchmark datasets. The source code is available at https://github.com/skleee/GRUT.

## introduction generative recommendation (gr) is an emerging paradigm that redefines the traditional recommendation task as a text-to-text generation problem @xcite . while the conventional discriminative approach ranks items individually @xcite , gr directly generates the identifier (id) of the target item given a user history. notably, it benefits from directly leveraging the extensive capabilities of large language models (llms) for recommendations @xcite . despite its success, existing gr models overlook a crucial dimension: temporal dynamics. as illustrated in figure 1 , the temporal information of items significantly affects user preferences @xcite . without temporal information, the model might recommend another 'stuffed animal' based on frequent occurrences in the user history, even after preference has shifted toward the 'lego product' over one year (figure 1a ). in contrast, a time-aware gr model can accurately discern preference shifts and recommend products that match the user's current interests by considering temporal dynamics (figure 1b ). moreover, timestamps may imply seasonal preferences that the mere item order cannot capture, e.g., christmas or holidays @xcite . incorporating temporal information into recommendations yields several challenges. (i) temporal signals exist in distinct forms: absolute timestamps and relative time intervals across user interactions. each provides different signals, making it challenging to preserve their information while effectively combining them @xcite . (ii) temporal item patterns vary in scope from individual user behavior to collective item-level trends and transition patterns. the collective patterns further require analyzing the interaction of all users. while previous work has adopted graph-based methods @xcite , representing temporal knowledge in natural language form for gr remains unexplored. (iii) integrating temporal signals into gr requires unique modeling. unlike traditional sequential models that rely on explicit temporal embeddings @xcite @xcite or contrastive learning @xcite @xcite , it is crucial to translate complex temporal patterns into natural language. concurrently, gr models are required to maintain the ability to generate precise item ids from the vast item candidate pool. to address these challenges, we propose a novel model, generative recommender using time awareness (grut), enhancing gr through temporal signals of items. to model distinct temporal signals, we first introduce time-aware prompting, which consists of two contexts. at the user level, we integrate absolute timestamps and time intervals between interactions in the prompt to model individual user patterns. at the item level, item transition patterns are represented in natural language forms, incorporating broader temporal patterns that individual user history alone cannot provide. besides, we devise trend-aware inference, a flexible method that refines beam search ranking with the temporal trend of items. it adaptively combines item generation likelihoods with trend scores, assigning higher scores to recently trending items. despite its simplicity, it enables the model to reflect diverse and timely recommendation scenarios. our key contributions are summarized as follows: (i) to the best of our knowledge, this is the first work to integrate temporal dynamics into gr, demonstrating its importance beyond the mere sequential order of items. information utilization and whether they employ generative approaches @xcite . ## background let u and i denote the sets of users and items, respectively. each user @xmath0, . . . , i |su| ), where each interaction corresponds to actions such as purchasing or clicking. each element i j represents the item the user interacted with at the j-th position, and |s u | indicates the number of items in s u . the timestamp sequence is denoted by t @xmath1, . . . , t |su| ), indicating the temporal information corresponding to s u . sequential recommendation aims to predict the next item i |su|+1 ∈ i that the user is most likely to interact with. for generative recommendation, each item @xmath2. generally, item ids can be represented as a sequence of codebook tokens @xcite or short text @xcite . with the item id, the user sequence is converted to the sequence of item ids @xmath3, ĩ2 , . . . , ĩ|su| ). following lee et al. (2025), we extract keywords from item descriptions using term frequency @xcite to create descriptive item ids. 3 in existing studies @xcite , the user sequence is represented without temporal information: what would the user purchase after ĩ1 , ĩ2 , . . . , ĩ|su| ? here, the goal is to generate the target item id ĩ|su|+1 , which the user is most likely to prefer. ## proposed model we present a generative recommender using time awareness (grut), which enhances gr via explicit modeling of temporal dynamics. the overall architecture is depicted in figure 2 . our primary contribution is time-aware prompting that effectively captures temporal patterns from both individual user behavior and collective user transitions (section 4.1). these patterns are then utilized in context-integrated id generation (section 4.2). after training, we design trend-aware inference, which refines rankings by incorporating generation likelihood with temporal trends (section 4.3). ## experimental setup datasets. we conduct experiments on four realworld datasets: three subcategories from the amazon review dataset @xcite foot_2 ("sports and outdoors", "beauty", and "toys and games") and the yelp dataset foot_3 . we apply the standard 5-core filtering, removing users and items with fewer than five interactions, following @xcite . the data statistics are in evaluation protocols and metrics. we adopt the leave-one-out strategy to split train, validation, and test sets following @xcite ; zheng et al. @xcite . for each user sequence, we use the last item for testing, the second last item as validation data, and the remaining items as training data. rather than sampling items, we conduct full-ranking evaluations on all items to ensure an accurate assessment. for metrics, we adopt top-k recall (r@k) and normalized discounted cumulative gain (n@k) with cutoff @xmath4, 10}. baselines. we validate the effectiveness of grut against the following nineteen sequential recommenders as baselines. for traditional baselines, we adopt six models: gru4rec @xcite , hgn @xcite , sas-rec @xcite , bert4rec @xcite , fdsa @xcite , and s 3 rec @xcite . for temporal baselines, we adopt four models: tisasrec @xcite , ticoserec @xcite , hm4sr @xcite , and horae @xcite . lastly, we adopt nine state-of-the-art generative recommenders: p5-sid, p5-cid, p5-semid @xcite , tiger @xcite , @xcite . we tuned all hyperparameters on the validation set using ndcg@10. we used adam optimizer (kingma and ba, 2015) with a learning rate of 0.001 and a linear scheduler with a warm-up ratio of 0.05. the maximum text length and the batch size were set to 128. consistent with the generative baselines @xcite @xcite , we initialized with t5-small @xcite . due to space limits, we provide further details in appendix b.3. ## conclusion we propose grut, a novel model that effectively incorporates temporal dynamics into gr. our timeaware prompting captures both user-specific temporal patterns and item-level transition knowledge. additionally, trend-aware inference enhances rank-ings by injecting trend information. extensive experiments on four benchmark datasets demonstrate improvements of grut compared to state-of-theart recommendation models, up to 15.4% in r@5 and 14.3% in n@5, particularly in scenarios with long time intervals between interactions. our work highlights the importance of time awareness in gr, opening new directions for future models that better reflect evolving user preferences.