UniTraj: Cross-Domain Long-Sequence Modeling for Commercial Recommendation
Abstract
Long-sequence modeling is increasingly important in recommender systems for capturing users’ evolving and long-term interests. In advertising, however, user interaction histories are often highly sparse due to limited exposure opportunities, making ad-only behavior sequences insufficient for effective long-sequence recommendation. To address this limitation, we propose UniTraj, a practical framework that extends sequence construction beyond the advertising domain by incorporating behaviors from content-consumption scenarios, forming unified commercial trajectories across domains and scenarios. Such unified trajectories provide richer behavioral context, but also introduce substantial heterogeneity in feature taxonomy, behavioral semantics, and optimization targets. In particular, they raise three key challenges: interference among fields from different domains and scenarios, target-specific conflicts in temporal and semantic patterns, and complex high-order dependencies across heterogeneous behavioral signals. To tackle these challenges, UniTraj adopts a two-stage design. In the first stage, it combines hierarchical hard search with a decoupled embedding-based soft search module to retrieve relevant behaviors under complex feature hierarchies while reducing conflicts between retrieval and representation learning. In the second stage, it introduces several decoupled sequence modeling components, including Decoupled Side Information Temporal Interest Networks for mitigating cross-field interference, target-decoupled positional encoding and target-decoupled SASRec for capturing target-aware temporal dynamics, and Deep TIN for modeling high-order behavioral correlations. We deploy UniTraj in a large-scale online advertising system and observe consistent improvements in online business metrics across multiple commercial scenarios. The results demonstrate the effectiveness of unified cross-domain behavior modeling for long-sequence recommendation in sparse advertising environments.