Sequential recommendation has rapidly advanced in click-through rate prediction due to its ability to model dynamic user interests. A key challenge, however, lies in modeling long sequences: users often exhibit significant interest shifts, introducing substantial irrelevant or misleading information. Our empirical analysis corroborates this challenge and uncovers a recurring behavioral pattern in long sequences (session hopping): user interests remain stable within short temporal spans (sessions) but shift drastically across sessions and may reappear after multiple sessions. To address this challenge, we propose the Mixture of Sequence (MoS) framework, a model-agnostic MoE approach that achieves accurate predictions by extracting theme-specific and multi-scale subsequences from noisy raw user sequences. First, MoS employs a theme-aware routing mechanism to adaptively learn the latent themes of user sequences and organizes these sequences into multiple coherent subsequences. Each subsequence contains only sessions aligned with a specific theme, thereby effectively filtering out irrelevant or even misleading information introduced by user interest shifts in session hopping. In addition, to alleviate potential information loss, we introduce a multi-scale fusion mechanism, which leverages three types of experts to capture global sequence characteristics, short-term user behaviors, and theme-specific semantic patterns. Together, these two mechanisms endow MoS with the ability to deliver accurate recommendations from multi-faceted and multi-scale perspectives. Experimental results demonstrate that MoS consistently achieves the SOTA performance while introducing fewer FLOPs compared with other MoE counterparts, providing strong evidence of its excellent balance between utility and efficiency. The code is available at https://github.com/xiaolin-cs/MoS.
Figures & tables
Figure 1. An illustration of user interests. The user undergoes two interest shifts, resulting in three clearly distinct sessions. Within each session, the browsing history reflects a consistent user interest.
Figure 2. Heatmap of the self-similarity matrix for a representative user transaction history. Red indicates high similarity , blue indicates low similarity , and green lines denote session boundaries.
Figure 3. The pipeline of MoS . The left panel illustrates theme-aware routing, which assigns inputs to experts according to theme vectors in the codebook. The right panel shows multi-scale fusion, which models user behaviors by extracting subsequences at different granularities from the full sequence.
Dataset
MicroVideo
KuaiVideo
Ebnerd
Rank
Backbone
Method
AUC
GAUC
AUC
GAUC
AUC
GAUC
AUC
GAUC
Mamba4Rec
Vanilla
66.55
69.16
66.27
66.26
63.08
62.68
4.00
2.67
DSelect-k
68.40 (+1.85)
68.94 (-0.22)
66.48 (+0.21)
66.22 (-0.04)
63.59 (+0.51)
62.50 (-0.18)
2.00
4.00
GShard
66.05 (-0.50)
68.15 (-1.01)
65.89 (-0.38)
65.74 (-0.52)
63.26 (+0.18)
63.79 (+1.11)
4.67
4.33
Expert
66.07 (-0.48)
69.04 (-0.12)
66.29 (+0.02)
66.06 (-0.20)
63.56 (+0.48)
64.18 (+1.50)
3.33
3.00
MoS
69.46 (+2.91)
70.01 (+0.85)
66.67 (+0.40)
66.67 (+0.41)
64.07 (+0.99)
64.54 (+1.86)
1.00
1.00
Table 1. Main evaluation of model utility on sequential recommendation. Higher AUC and GAUC values indicate better performance. Utility performance as well as the average ranking are reported on four sequential recommendation backbones, comparing MoS with three MoE baselines and the vanilla backbone (without MoE enhancement). Red font highlights the best performance , while blue font denotes the second best . Numbers in parentheses indicate the performance gain brought by MoE.
Method
MicroVideo
KuaiVideo
Ebnerd
AUC
GAUC
AUC
GAUC
AUC
GAUC
Baseline
MIRRN
67.17
68.74
67.94
65.5
69.19
69.01
MiasRec
68.67
67.83
65.05
64.70
55.95
55.45
AttenMixer
68.97
68.89
66.95
64.18
62.37
62.29
MoS
TWIN
70.83
70.26
69.62
66.89
66.89
69.81
SDIM
71.36
70.23
69.38
66.75
69.49
69.49
Table 2. Performance comparison between MoS and baselines employing similar multi-scale fusion architectures.
Figure 4. Trade-off between utility and efficiency. MoS achieves superior utility–efficiency balance, appearing closer to the upper-left region for every backbone (color).
Figure 5. Dispatch behavior of routers for the most popular item. MoS consistently routes the popular item to a fixed expert, indicating strong consistency of theme-aware routing and clear expert specialization compared to other routers.
Figure 6. Impact of αI and αW on model utility.
Figure 7. Scaling study of MoS. MoS consistently enhances AUC/GAUC with increased sequence length and number of experts.
Figure 8. Examples of Session Hopping
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure 9. Comparison between dispatch behavior of different MoE routers.
Modeling long-term user behavior is central to sequential recommendation and billion-scale industrial recommender systems, yet production ranking models operate under strict latency, memory, communication, and training-throughput constraints. At the 100K scale, the challenge extends beyond attention complexity: raw sequence features must be stored, transferred, and repeatedly processed during training and online serving. Existing approaches based on history truncation, multi-stage behavior retrieval, compressed lifelong histories, or train-short/infer-long extrapolation either weaken end-to-end optimization or retain substantial length-dependent cost. We present SequenceO1, an end-to-end framework for ultra-long user behavior sequence modeling, deployed at full traffic on Douyin with histories of up to 100K interactions. SequenceO1 follows a compress-then-reason design. Its Sketch Attention (SA) uses learnable prototypes and prototype-wise normalization to compress the raw history into a fixed-size, target-agnostic user representation. Target-conditioned Stacked Target-to-History Cross Attention (STCA) then models complementary time scales: a recent 10K suffix for short-term interests and the compact sketch for long-term preferences. To make training and inference practical, SequenceO1 combines low-rank user representation caching, multi-request user-level batching, pipeline lift, and a fused FlashSA kernel to amortize feature storage, communication, and computation across targets, training instances, and consecutive requests. Production experiments show consistent offline and online gains, while the compact cached sketch retains most of the benefit of directly scaling end-to-end sequence ranking to 100K. These results provide a practical model-system approach to efficient attention, sequence compression, and scalable long-sequence and long-context recommendation systems.
Sessionized interaction histories contain behavioral patterns that can improve sequential recommendation. However, existing models process all sessions through the same parameterized blocks, regardless of their behavioral differences. Mixture of Experts (MoE) enables conditional computation, but it leaves open what should guide expert allocation. We propose RouteRec, a sequential recommender that uses observed session behavior as the routing criterion. RouteRec summarizes four types of behavioral evidence from sessionized histories: interaction tempo, item-group focus, repetition and carryover, and popularity tendency. It uses these cues to route computation at macro, mid, and micro scopes. Cue-derived scores first select expert groups; within each selected group, the current backbone state then refines expert selection. Across six public datasets and 18 dataset-metric combinations, RouteRec ranks first in 12 and second in three, yielding the best overall average rank of 1.61 compared with 4.11 for the next-best baseline. Additional analyses suggest that the behavioral cues guide expert allocation beyond added capacity and produce routing patterns aligned with observed behavior. Our code is available at https://github.com/jy1559/RouteRec
Junyeong Song, Jaemin Yoo
Korea Advanced Institute of Science and Technology Daejeon, Republic of Korea · Seoul National University Seoul, Republic of Korea
Modeling long sequences of user behaviors has emerged as a critical frontier in generative recommendation. However, existing solutions face a dilemma: linear attention mechanisms achieve efficiency at the cost of retrieval precision due to limited state capacity, while softmax attention suffers from prohibitive computational overhead. To address this challenge, we propose HyTRec, a model featuring a Hybrid Attention architecture that explicitly decouples long-term stable preferences from short-term intent spikes. By assigning massive historical sequences to a linear attention branch and reserving a specialized softmax attention branch for recent interactions, our approach restores precise retrieval capabilities within industrial-scale contexts involving ten thousand interactions. To mitigate the lag in capturing rapid interest drifts within the linear layers, we furthermore design Temporal-Aware Delta Network (TADN) to dynamically upweight fresh behavioral signals while effectively suppressing historical noise. Empirical results on industrial-scale datasets confirm the superiority that our model maintains linear inference speed and outperforms strong baselines, notably delivering over 8% improvement in Hit Rate for users with ultra-long sequences with great efficiency.
Lei Xin, Yuhao Zheng, Ke Cheng +3
Shanghai Dewu Information Group · Wuhan University · USTC +1