Source-linked AI summary
Decoupled Temporal Encoding for Generative Recommendation
Pengfei Jia, Jingjian Wang, Jingmao Li, Ge Zhang, Feng Shi
TL;DR
Existing positional encodings often conflate broad temporal dynamics with local order in recommendation sequences. DTE decouples these signals through personalized macro-temporal and time-gated micro-sequential modules, achieving consistent offline gains and online improvements in CTR and RPM with minimal latency overhead.
Problem
Existing positional encodings often conflate broad temporal effects with local sequential order, although recommendation behavior exhibits multi-level temporal regularities.
Method
DTE separates temporal dynamics from order through compact macro-temporal primitives and a time-gated relative-order bias activated for temporally dense interactions.
Results
DTE achieves the best performance on both datasets and improves online CTR by +1.8% and RPM by +3.0% versus the production baseline.
Takeaways & Limitations
DTE delivers consistent offline ranking gains and measurable online business improvements with only +0.3% average serving latency.
Takeaways & Limitations
The burst-sensitive macro-temporal component is optional and scenario-specific, with greater benefit where candidate-side traffic fluctuations are common and pronounced.
Abstract
from arXiv · showhide
Positional encoding is a fundamental component of Transformer-based generative recommendation models, where user histories are modeled as autoregressive item sequences. Most positional encoding methods are inherited from natural language processing and mainly represent discrete item order. However, recommendation sequences go beyond ordered lists, as timestamps and temporal effects also shape item relations. Our work is motivated by a real-world food delivery and instant retail recommendation system, where user behavior exhibits multi-level temporal regularities, including recency effects, meal-time peaks, weekday-weekend shifts, and promotion-driven traffic bursts. Existing methods partially address this issue through timestamp features, interval embeddings, decay functions, or attention biases, but they usually inject heterogeneous temporal signals through a unified representation or a single modeling pathway, making it difficult to distinguish broad temporal dynamics from local order cues. To address this limitation, we propose Decoupled Temporal Encoding, a lightweight framework for generative recommendation. DTE separates temporal dynamics from order information through two complementary modules: a personalized macro-temporal module that injects compact temporal primitives into item embeddings, and a time-gated micro-sequential module that introduces relative-order bias only when interactions are temporally dense. DTE is also parameter-efficient and deployment-friendly, allowing easy integration into existing systems.
1 Introduction
The paper introduces Decoupled Temporal Encoding (DTE) for generative recommendation, separating broad temporal dynamics from local sequential order through macro-temporal and time-gated micro-sequential modules. It targets production settings with strict serving constraints and is evaluated offline, online, and in full-traffic deployment.
- Introduction: DTE separates temporal context from order information using an input-level macro-temporal module and a time-gated micro-sequential attention bias based on pairwise time gaps.The macro-temporal module models compact temporal context, while the micro-sequential module adds order bias only through temporal gating.
- Introduction: Generative recommendation models user interaction histories as item sequences and formulate next-item recommendation as autoregressive sequence generation.This paradigm naturally models evolving user interests.
- Introduction: Existing methods often unify heterogeneous temporal effects, making broad temporal dynamics harder to distinguish from local sequential order.This limitation is especially relevant in production recommendation.
- Introduction: DTE is designed for production constraints, addressing sparsity and maintenance costs from large interval embedding tables and deployment overhead from heavier pairwise temporal parameterization.The introduction frames temporal modeling as needing to improve ranking quality under strict serving constraints.
- Introduction: DTE is validated through offline and online evaluations on a public benchmark and large-scale industrial dataset, including online A/B testing and full-traffic deployment in Taobao App’s Shangou advertisement recommendation system.The implementation is available at github.com/AlibabaResearch/DecoupledTemporalEncoding.
2 Related Work
Prior positional encodings represent discrete order but are not explicitly designed for continuous temporal patterns. Temporal recommendation methods and sequence-decomposition approaches address related aspects, while DTE decouples continuous-time dynamics directly within temporal encoding.
- Positional Encoding: Standard positional encodings include absolute methods such as sinusoidal embeddings and relative methods such as RoPE, T5-style relative bias, and ALiBi.These methods effectively represent discrete order and are widely used in sequence modeling.
- Temporal Recommendation: Sequential recommendation methods incorporate time through recurrent gating, time features, discretized intervals, or lightweight context-dependent attention biases.Examples include TimeLSTM, BST, TiSASRec, and relative attention bias in HSTU.
- Sequence Decomposition: Sequence-decomposition methods improve user modeling by segmenting sessions or aggregating long-term and short-term interests.Examples include DSIN, SIM, TWIN, FIN, and DualGR.
- DTE Positioning: DTE applies decoupling directly to temporal encoding by separating continuous-time dynamics from sequential information.This distinguishes its approach from methods that decompose sequences through segmentation or interest aggregation.
3 Methodology
DTE extends a decoder-only Transformer for generative recommendation by separating macro-temporal dynamics from micro-sequential order. It injects compact timestamp signals into item representations and applies relative-order bias only for temporally dense interactions.
- Backbone: The model causally predicts the next item from a chronological user-interaction history using a decoder-only Transformer and lightweight task tower.The backbone follows the generative recommendation paradigm of HSTU.
- Decoupled temporal encoding: DTE separates temporal and order information by injecting macro-temporal signals into input representations and micro-sequential order through attention.These are the framework’s two complementary modification levels.
- Macro-temporal module: Macro-temporal signals capture user-dependent recency and periodicity, while an optional burst-sensitive component models short-term target-side traffic deviations.The burst component complements user-level temporal signals and is most useful when candidate-side traffic fluctuations are pronounced.
- Macro-temporal module: The macro-temporal module adds a learnable projection of a scalar temporal signal to each base item embedding using a small set of temporal primitives.This compact design targets common long-range temporal effects and is intended to remain interpretable.
- Micro-sequential module: The micro-sequential module applies a sigmoid-gated relative-order attention bias based on absolute time gaps, activating order information only within a learnable dense-interaction range.Sequential order remains auxiliary to timestamps and addresses cases where closely spaced interactions are difficult to distinguish temporally.
4 Experiments
Experiments on an industrial food-delivery and instant-retail dataset and KuaiRand 1K show that DTE improves offline performance through complementary macro-temporal and selectively gated micro-sequential modeling. Robustness analyses and a three-week online test further support gains across temporal conditions with minimal serving-latency impact.
- 4.1 Experimental Setup: DTE is evaluated on a real-world industrial impression-click dataset and the public KuaiRand 1K benchmark using chronological histories and splits.Industrial histories use interactions strictly preceding each impression within a one-year production window; KuaiRand contains one month of user-video logs.
- 4.1 Experimental Setup: Offline evaluation uses GAUC and Logloss, while online evaluation reports CTR, RPM, and latency.Parameter, memory, and offline inference-latency overhead are also analyzed.
- 4.2 Main Results: DTE achieves the best performance on both datasets, outperforming order-only positional encodings and time-aware baselines.The results support explicit temporal modeling and separating macro-temporal dynamics from sequential order rather than combining all temporal effects in one embedding.
- 4.3 Ablation Study: Removing either macro or micro modules degrades performance, while removing the soft gate also hurts, confirming complementary long-range context and selectively activated sequential order.The burst term has a larger effect on the industrial dataset because promotions create stronger entity-level traffic deviations than in KuaiRand.
- 4.4 Sensitivity and Robustness: DTE gains are largest on dense sequences, stronger for users with greater periodicity, and stable across short-, medium-, and long-history groups.These patterns align with the design in which dense timestamps increase the usefulness of relative order, while macro-temporal modeling captures periodicity.
- 4.5 Online Evaluation: +1.8% CTR and +3.0% RPM were achieved online versus the production baseline, with average serving latency increasing only +0.3% (15.4 ms to 15.5 ms).The test used a 20% control bucket and lasted three full weeks; CTR and RPM improvements were statistically significant.
5 Conclusions
DTE addresses the conflation of heterogeneous temporal effects with local sequential order in generative recommendation. It decouples macro-temporal context from micro-level sequential order through two lightweight, deployment-friendly modules with minimal additional parameters and latency overhead.
- 5 Conclusions: DTE distinguishes heterogeneous temporal effects, including recency and periodicity, from local sequential order while treating them as complementary.Existing positional encoding methods often conflate these signals in a single representation.
- 5 Conclusions: DTE decouples macro-temporal context from micro-level sequential order through two lightweight modules.The framework separates broad temporal context from local order information rather than modeling them through one representation.
- 5 Conclusions: DTE is deployment-friendly, requiring minimal additional parameters and latency overhead.This design targets practical integration into generative recommendation systems.