Modern transformer-based sequential recommenders excel at capturing short-term intent but often suffer from recency bias, overlooking stable long-term preferences. While extending sequence lengths is an intuitive fix, it is computationally inefficient, and recent interactions tend to dominate the model's attention. We propose Long-Term Embeddings (LTE) as a high-inertia contextual anchor to bridge this gap. We address a critical production challenge: the point-in-time consistency problem caused by infrastructure constraints, as feature stores typically host only a single "live" version of features. This leads to an offline-online mismatch during model deployments and rollbacks, as models are forced to process evolved representations they never saw during training. To resolve this, we introduce an LTE framework that constrains embeddings to a fixed semantic basis of content-based item representations, ensuring cross-version compatibility. Furthermore, we investigate integration strategies for causal language modeling, considering the data leakage issue that occurs when the LTE and the transformer's short-term sequence share a temporal horizon. We evaluate two representations: a heuristic average and an asymmetric autoencoder with a fixed decoder grounded in the semantic basis to enable behavioral fine-tuning while maintaining stability. Online A/B tests on Zalando demonstrate that integrating LTE as a contextual prefix token using a lagged window yields significant uplifts in both user engagement and financial metrics.
Figures & tables
Integration method
Window
Uniform
Recency
Late fusion (outside)
[365,0]
-0.70%
-3.05%
Feature injection (added)
[365,60]
+0.45%
+0.42%
Contextual anchoring
[365,60]
+1.31%
+0.87%
Table 1. NDCG@500 Uplift for LTE integration strategies.
Figure 1. Statistical consistency of LTE attention migration. The delta (LTE - baseline) is computed after normalizing attention weights within the most recent 50 interactions to a local share of 1.0. The model appears to moderate mid-session fluctuations to reclaim attention share for older history. Gray bands indicate the 95% confidence interval calculated across the holdout set. Bar chart showing the attention migration delta (LTE minus baseline) over the last 50 interaction positions. Older positions (x_{N-49} to x_{N-25}) show positive deltas indicating increased attention, while mid-recent positions (x_{N-24} to x_{N-1}) show negative deltas indicating decreased attention. Gray bands indicate 95% confidence intervals.
Rollback
Avg. turnover
Mean
Relative
offset ( X )
rate ( τ )
cosine sim.
resilience
1 Day
0.7%
0.997
+0.69%
5 Days
2.8%
0.994
+1.01%
10 Days
5.4%
0.985
+1.65%
Table 2. Stability and resilience of LTE under version mismatch.
Engagement
Browse
Search
All
Revenue
Estimate
+1.16%
+0.15%
+0.61%
+0.42%
95% CI
[0.79, 1.53]%
[-0.2, 0.5]%
[0.32, 0.9]%
[0.07, 0.76]%
Table 3. A/B test results for integrating LTE into the ranking model. Engagement encompasses high-value actions (add-to-wishlist, add-to-cart). Revenue represents net merchandise volume per user.
Figure 2. Asymmetric autoencoder for LTE fine-tuning. The learnable encoder projects a user’s multi-hot history hu into a latent bottleneck zu (the fine-tuned LTE). By using a frozen content-embedding matrix E as the decoder, we force the model to learn behavioral affinities (e.g., price-point) while remaining grounded in a stable semantic space. Reconstruction is computed as y^u=zuE⊺ , ensuring compatibility with the heuristic content-based average. Architecture diagram of the asymmetric autoencoder. A learnable encoder maps a user's sparse multi-hot history vector through multiple non-linear layers into a latent bottleneck z_u. A frozen content-embedding matrix E serves as the decoder, producing reconstruction logits via dot product.
Transformers have redefined sequential recommendation by effectively modeling dynamic user behaviors and long-range dependencies. However, they remain inherently inefficient: standard architectures operate at a fixed rate, allocating comparable computation to every item in a user's history regardless of its information content. This leads to prohibitive computational overhead on long sequences and increased sensitivity to behavioral noise. To address this, practitioners often resort to lossy sequence compression, staged modeling, or truncation. This limits the model's ability to leverage the full context of long histories during inference. Inspired by the recent success of Byte Latent Transformer, we propose DP-Rec, a dynamic latent patching architecture for recommendation. DP-Rec shifts from item-level modeling to patch-level modeling by segmenting interaction sequences using contrastive entropy surprise to identify informative behavioral boundaries. A lightweight patch encoder compresses these temporally contextualized segments into a reduced set of dynamic latent behavior vectors, which are then processed by a larger latent transformer and decoded for next-item prediction. Extensive experiments show that, under constrained computational budgets, DP-Rec scales effectively to long sequences and achieves a superior efficiency-accuracy trade-off over both non-compressed and fixed-size compression baselines.
Dwipam Katariya, Thomas Caputo, Akshat Shreemali +6
Large language models (LLMs) can summarize heterogeneous user evidence in natural language, but current LLM recommenders often collapse enduring preferences, transient intent, and exposure-induced behavior into one profile. This makes recommendation vulnerable to feedback loops: repeated exposure is mistaken for preference, immediate clicks dominate delayed satisfaction, and fluent explanations need not reflect the ranking decision. We propose our method, a model-agnostic framework for long-horizon recommendation. Our method uses a frozen multimodal language model to convert item content and feedback into evidence-grounded semantic atoms, then maintains separate short-term, long-term, and exposure memories. Propensity-weighted updates reduce policy-induced exposure bias, while a conservative offline critic reranks candidates for delayed satisfaction under a behavior-support constraint. Explanations use only influential evidence atoms and are checked by counterfactual deletion. We provide an identification result and evaluate the framework in e-commerce-like, news-like, and short-video-like environments. Across ten seeds, our method improves discounted long-term value over the strongest alternative by 6.1%, 7.6%, and 6.7%, respectively. Twenty-seed paired ablations show significant value drops after removing propensity correction (0.739 +/- 0.191) or conservative support regularization (0.523 +/- 0.234). A frozen instruction language model also more than doubles semantic-atom NDCG over TF-IDF on a held-out paraphrase benchmark.
Effective user modeling requires distinguishing between short-term and long-term preference evolution. While item embeddings have become a key component of recommender systems, standard approaches like Item2Vec treat user histories as unordered sets (bag-of-items), implicitly assuming that interactions separated by minutes are as semantically related as those separated by months. This simplification flattens the rich temporal structure of user behavior, obscuring the distinction between coherent consumption sessions and gradual interest drifts. In this work, we introduce TAI2Vec (Time-Aware Item-to-Vector), a family of lightweight embedding models that integrates temporal proximity directly into the representation learning process. Unlike approaches that apply global time constraints, TAI2Vec is user-adaptive, tailoring its temporal definitions to individual interaction paces. We propose two complementary strategies: TAI2Vec-Disc, which utilizes personalized anomaly detection to dynamically segment interactions into semantic sessions, and TAI2Vec-Cont, which employs continuous, user-specific decay functions to weigh item relationships based on their relative temporal distance. Experimental results across eight diverse datasets demonstrate that TAI2Vec consistently produces more accurate and behaviorally grounded representations than static baselines, achieving competitive or superior performance in over 80% of the datasets, with improvements of up to 135%. The source code is publicly available at https://github.com/UFSCar-LaSID/tai2vec.
Rafael T. Sereicikas, Pedro R. Pires, Gregorio F. Azevedo +1
Federal University of São Carlos · Sorocaba, São Paulo, Brazil