---
title: 'HorizonRec: Cross-Domain Sequential Recommendation'
url: https://www.emergentmind.com/topics/horizonrec
type: topic
---

# HorizonRec: Cross-Domain Sequential Recommendation

Searching arXiv for the HorizonRec paper and closely related benchmark context.
Calling arXiv search.
HorizonRec is a cross-domain sequential recommendation framework introduced in “Align-for-Fusion: Harmonizing Triple Preferences via Dual-oriented Diffusion for Cross-domain Sequential Recommendation” [2508.05074]. It addresses the next-item prediction problem in a target domain by modeling three coupled preference signals: a source-domain sequence, a target-domain sequence, and a mixed-domain sequence obtained by chronologically merging behaviors from both domains. Its central claim is that cross-domain recommendation should not merely align representations before a separate fusion step; rather, alignment should occur during fusion in distribution space, using diffusion-based refinement conditioned on mixed-domain behavior. In this formulation, the mixed sequence acts as a semantic bridge that guides the denoising and fusion of source- and target-domain preferences, with the objective of improving fine-grained target-aware recommendation under sparsity and interest drift [2508.05074].

## 1. Problem setting and conceptual position

HorizonRec is formulated for cross-domain sequential recommendation (CDSR), where a user has a source sequence $S_u = [i_1^{(S)}, \ldots, i_p^{(S)}]$, a target sequence $T_u = [i_1^{(T)}, \ldots, i_q^{(T)}]$, and a mixed sequence $M_u = [i_1^{(M)}, \ldots, i_{p+q}^{(M)}]$ obtained by chronological merge. The target task is to predict the next target-domain item,
$$
\arg\max_{i \in I_T} p(i \mid S_u, M_u, T_u),
$$
with training performed through cross-entropy over dot products between a fused user representation and candidate target-item embeddings [2508.05074].

The model is positioned against what the paper calls an “align-then-fusion” paradigm. In that baseline view, representation-level alignment across domains is optimized first, and domain representations are then combined mechanically, such as by concatenation or averaging. HorizonRec instead advances an “align-for-fusion” formulation in which source and target representations are denoised iteratively while conditioned on the mixed-domain representation. The paper’s interpretation is that this better preserves domain-specific nuances while suppressing noise during preference combination [2508.05074].

A useful way to understand the model is through its “triple preferences”: source-domain preference, target-domain preference, and mixed-domain preference. The mixed preference is not an auxiliary summary in a loose sense; it is the conditioning signal that organizes the other two. This suggests that HorizonRec treats cross-domain transfer less as explicit representation matching and more as guided distributional harmonization.

## 2. Triple-domain representation and the role of the mixed sequence

HorizonRec instantiates two explicit domains, source $S$ and target $T$, and additionally constructs a mixed domain $M$ by merging source and target events according to timestamps. Item embeddings are defined in each domain, and per-domain sequence representations are produced by SASRec encoders operating over source, target, and mixed histories [2508.05074].

The mixed sequence is the defining structural element. Because it reorders behaviors from both domains in chronological order, it encodes cross-domain transitions as they occur in user behavior rather than as post hoc alignments of separately encoded sequences. The paper characterizes $M$ as the “horizon”: a globally focused semantic bridge that guides fine-grained fusion. In the model’s architecture, the mixed representation $h_M$ is concatenated with noisy source or target representations and a diffusion-step embedding before denoising. Conditioning vectors are
- $c_{\text{target}} = [h_t^{(T)}; h_M; t_{\text{emb}}]$,
- $c_{\text{aux}} = [h_t^{(S)}; h_M; t_{\text{emb}}]$,
and both are processed by the same attention-based denoiser for their respective orientations [2508.05074].

This design matters because CDSR often fails when auxiliary information is transferred without regard to target relevance. HorizonRec’s claim is that mixed-domain chronology provides a behaviorally grounded context for deciding which source-side patterns are useful to the target task. The model therefore does not assume that all cross-domain overlap is beneficial. Instead, it attempts to make source and target information mutually informative only after conditioning them on the mixed-domain trajectory.

## 3. Diffusion formulation and uncertainty injection

HorizonRec adopts a DDPM-style diffusion process on user representations. The forward process adds Gaussian noise to a clean vector $x_0$:
$$
q(x_t \mid x_{t-1}) = \mathcal{N}(x_t; \sqrt{1-\beta_t}\,x_{t-1}, \beta_t I),
$$
with marginal
$$
q(x_t \mid x_0) = \mathcal{N}(x_t; \sqrt{\bar{\alpha}_t}\,x_0, (1-\bar{\alpha}_t) I),
$$
and reparameterization
$$
x_t = \sqrt{\bar{\alpha}_t}\,x_0 + \sqrt{1-\bar{\alpha}_t}\,\epsilon,\qquad \epsilon \sim \mathcal{N}(0,I).
$$
The reverse model reconstructs the clean representation conditionally:
$$
\hat{x}_0 = f_\theta(x_t, c, t),
$$
and the diffusion objective is an MSE reconstruction loss,
$$
L_{\text{diff}} = \mathbb{E}_{x_0,\epsilon,t}\big[\|x_0 - f_\theta(\sqrt{\bar{\alpha}_t}x_0 + \sqrt{1-\bar{\alpha}_t}\epsilon, c, t)\|^2\big].
$$
Recommendation training combines this term with a cross-entropy loss for next-item prediction [2508.05074].

A central motivation for HorizonRec is the instability caused by user-agnostic Gaussian perturbations in DM-based recommenders. The paper argues that purely random noise can disrupt subtle source-target dependencies, exacerbate inter-domain distribution shift, and push representations in semantically irrelevant directions. In this account, the problem is not diffusion per se, but unconstrained uncertainty injection [2508.05074].

The denoiser $f_\theta$ is implemented as a lightweight attention block,
$$
f_\theta(h_t, h_M, t) = \text{Softmax}(QK^\top/\sqrt{d})V,
$$
where $Q$, $K$, and $V$ are learned from linear projections of the concatenated inputs. This architectural choice makes the reverse process explicitly conditional on mixed-domain information rather than treating conditioning as a weak side signal.

## 4. Mixed-conditioned distribution retrieval

To replace generic Gaussian perturbation with behaviorally grounded uncertainty, HorizonRec introduces mixed-conditioned distribution retrieval (MDR). For each user, the model builds a candidate pool from contiguous subsequences of the mixed sequence that end with a target-domain item:
$$
D_u = \{(i_a^{(M)}, \ldots, i_b^{(M)}) \mid b \le |M_u|,\; i_b^{(M)} \in I_T\}.
$$
Each candidate subsequence is encoded by a position-aware low-pass filter,
$$
e_d = \sum_{j=k}^{b} w_j e(i_j), \qquad w_j = \frac{c}{1 + n(b-j+1)},
$$
where $c>1$ increases early-position importance and $n$ controls decay [2508.05074].

These filtered subsequence embeddings form a global retrieval database. For each domain representation $h_D$ with $D \in \{S,T\}$, the model retrieves the top-$K$ nearest mixed-domain subsequences by cosine similarity. It then defines a domain-specific noise distribution through
$$
\mu_D = \frac{1}{K}\sum_{k=1}^K (d_k - h_D), \qquad \sigma_D = \text{std}(\{d_k\}),
$$
and samples
$$
z_D = h_D + \mu_D + \sigma_D \epsilon,\qquad \epsilon \sim \mathcal{N}(0,I).
$$
The paper describes this as “mixed-conditioned” noise because it is retrieved from the user’s authentic mixed-domain behavioral logic and steered toward target-ending trajectories [2508.05074].

The intended effect is twofold. First, the perturbation is user-specific rather than generic. Second, the direction of perturbation is constrained by retrieved mixed-domain subsequences that already exhibit target relevance. The paper further summarizes theoretical intuitions: the retrieved distribution has lower variance than standard Gaussian in expectation, and the mean direction points toward trajectories ending in target items. A plausible implication is that MDR changes the role of noise from stochastic regularization to semantically anchored exploration in representation space.

## 5. Dual-oriented preference diffusion and fusion

The second major component is dual-oriented preference diffusion (DPD). Diffusion is applied separately to source and target representations, but both orientations are conditioned on the mixed-domain representation $h_M$. For each domain $D \in \{S,T\}$, the forward process is
$$
h_t^{(D)} = \sqrt{\bar{\alpha}_t}\,h_0^{(D)} + \sqrt{1-\bar{\alpha}_t}\,z_D,
$$
and the reverse denoising process reconstructs the representation using the mixed-domain condition:
$$
\hat{h}_{t-1}^{(D)} = f_\theta([h_t^{(D)}; h_M; t_{\text{emb}}]).
$$
After reverse diffusion, the denoised source and target reconstructions are summed,
$$
\tilde{h} = \hat{h}_0^{(S)} + \hat{h}_0^{(T)},
$$
and then combined with the original target representation through a gate $w \in [0,1]$:
$$
h_u = (1-w)h_T^{(\text{orig})} + w\tilde{h}.
$$
The total objective is
$$
L = L_{\text{rec}} + \lambda L_{\text{diff}},
$$
where $L_{\text{rec}}$ is the next-item cross-entropy and
$$
L_{\text{diff}} = \sum_{D \in \{S,T\}} \mathbb{E}\big[\|h_0^{(D)} - \hat{h}_0^{(D)}\|^2\big].
$$
The recommendation loss itself is
$$
L_{\text{rec}} = -\log \frac{\exp(h_u^\top e_{q+1})}{\sum_{i \in I_T}\exp(h_u^\top e_i)}.
$$
All parameters are updated with Adam [2508.05074].

The paper’s argument is that noise suppression and target emphasis emerge from conditioning and reconstruction, rather than from explicit contrastive or KL regularization. It also states an alignment advantage,
$$
d_{\text{align}}(h_S, h_T \mid h_M) \le d_{\text{align}}(h_S, h_T),
$$
to express that conditioning on the mixed sequence reduces cross-domain misalignment [2508.05074].

A common misconception in CDSR is that better cross-domain recommendation necessarily follows from stronger global alignment. HorizonRec explicitly rejects that assumption. Its design presumes that over-alignment can wash out domain-specific signals and that the more relevant operation is target-aware harmonization during fusion.

## 6. Training pipeline, complexity, and empirical behavior

The training pipeline proceeds in four stages. First, source and target sequences are timestamp-sorted and merged into mixed sequences, from which contiguous mixed subsequences ending in target items are extracted and low-pass filtered to build the retrieval database. Second, SASRec encoders compute $h_S$, $h_T$, and $h_M$. Third, for each of the source and target branches, MDR retrieves top-$K$ mixed subsequences, constructs the domain-specific perturbation, and applies forward diffusion over $T$ steps followed by reverse denoising conditioned on $h_M$. Fourth, the denoised representations are fused, the recommendation and diffusion losses are computed, and the model is optimized [2508.05074].

The paper reports the following implementation settings: diffusion steps $T=32$, embedding dimension $d=64$, batch size $512$, max sequence length $200$, sliding window length $l=200$, low-pass parameters $c=1.5$ and $n=2$, retrieval $K \in \{5,10,15\}$, and fusion gate $w$ and diffusion weight $\lambda$ searched over $\{0.1,\ldots,0.9\}$. Hardware is an NVIDIA RTX 4090 with Python 3.10.9 [2508.05074].

The additional cost of HorizonRec is attributed to retrieval and diffusion. The paper gives per-run overhead as $O(T \cdot d^2 + |D| \cdot d)$, with retrieval scan reducible via ANN indexing. Compared to Tri-CDR’s $O(3L^2 \cdot d)$, HorizonRec is described as asymptotically similar and empirically faster because $T$ is modest and retrieval is precomputed [2508.05074].

The empirical evaluation uses four CDSR settings from two platforms: Amazon Toy & Game and Douban Book & Music. Baselines include GRU4Rec, SASRec, CL4SRec, DiffuRec, SSCDR, UniCDR, DMCDR, C2DSR, Tri-CDR, SyNCRec, and ABXI. On Douban Book$\rightarrow$Music, HorizonRec reports $\mathrm{HR@5}=0.0710$, $\mathrm{NDCG@5}=0.0440$, $\mathrm{HR@10}=0.1067$, $\mathrm{NDCG@10}=0.0555$, $\mathrm{HR@20}=0.1469$, and $\mathrm{NDCG@20}=0.0655$, with consistently positive relative gains over strong CDSR baselines. On Douban Music$\rightarrow$Book, it reports $\mathrm{HR@5}=0.0797$, $\mathrm{NDCG@5}=0.0491$, $\mathrm{HR@10}=0.1166$, $\mathrm{NDCG@10}\approx0.0604$, $\mathrm{HR@20}=0.1543$, and $\mathrm{NDCG@20}=0.0698$, with gains reported as statistically significant under paired $t$-tests with $p<0.01$ across five random seeds. The paper also reports Amazon Game$\rightarrow$Toy and Amazon Toy$\rightarrow$Game results, including relative gains of approximately $2$–$7\%$ on Toy$\rightarrow$Game compared to strong CDSR baselines [2508.05074].

The efficiency analysis reports, for Douban Music, total training time of $261.60\,\mathrm{s}$ for HorizonRec versus $1466.88\,\mathrm{s}$ for Tri-CDR and $26110.74\,\mathrm{s}$ for ABXI, with inference latency of approximately $0.73\,\mathrm{s}$ when retrieval is precomputed [2508.05074].

## 7. Robustness, limitations, and relation to long-horizon recommendation

The ablation study attributes HorizonRec’s gains to both MDR and DPD. Replacing MDR with Gaussian noise degrades performance, turning off source-side or target-side diffusion harms alignment, and removing diffusion entirely in favor of static fusion performs worst. Alignment visualizations reported in the paper show HorizonRec’s final user representations more tightly co-located with target-item embeddings than those of Tri-CDR and ABXI, and cosine-similarity heatmaps indicate strong alignment to the mixed-domain representation while maintaining similarity to source and target preferences [2508.05074].

Parameter sensitivity follows a clear pattern: $K=0$ degenerates to Gaussian noise, moderate $K$ in the range $5$–$15$ is best, large $K$ introduces conflicting sequences, and performance peaks at diffusion steps $T=32$, with larger $T$ leading to over-smoothing and dilution of domain-specific signals [2508.05074]. These findings are consistent with the model’s underlying premise that cross-domain transfer should be selective rather than exhaustive.

The framework also has explicit limitations. It requires users to have interactions in both source and target domains, relies on reliable timestamps to construct the mixed sequence, and depends strongly on retrieval quality. Extremely short sequences or insufficient mixed-domain candidates reduce MDR’s effectiveness, and highly nonstationary domains with abrupt, uncorrelated shifts may challenge the refinement process [2508.05074].

In a broader research context, HorizonRec addresses CDSR at the model-design level, whereas HORIZON is a benchmark that reformulates user modeling along the axes of dataset, task, and evaluation to test cross-domain, temporal, and user-level generalization [2604.17259]. HORIZON is built from Amazon Reviews 2023 with unified histories across $33$ categories, covers $54.51\mathrm{M}$ users, $34.52\mathrm{M}$ items, and $485.89\mathrm{M}$ interactions, and emphasizes that real-world user modeling requires generalization across domains, users, and time rather than only same-domain next-item prediction [2604.17259]. This suggests a natural interpretive link: HorizonRec proposes a target-aware fusion mechanism for CDSR, while HORIZON defines a large-scale evaluation setting in which long-range temporal generalization and cross-domain robustness become explicit benchmarks. A plausible implication is that methods in the style of HorizonRec may need to integrate stronger semantic grounding and longer-context modeling to remain effective under the distribution shifts emphasized by HORIZON [2604.17259].

Source: https://www.emergentmind.com/topics/horizonrec