Abstract
Sequential recommendation predicts each user's next item based on their historical interaction sequence. Recently, diffusion models have attracted significant attention in this area due to their strong ability to model user interest distributions. They typically generate target items by denoising Gaussian noise conditioned on historical interactions. However, these models face two critical limitations. First, they exhibit high sensitivity to the condition, making it difficult to recover target items from pure Gaussian noise. Second, the inference process is computationally expensive, limiting practical deployment. To address these issues, we propose FlowRec, a simple yet effective sequential recommendation framework which leverages flow matching to explicitly model user preference trajectories from current states to future interests. Flow matching is an emerging generative paradigm, which offers greater flexibility in initial distributions and enables more efficient sampling. Based on this, we construct a personalized behavior-based prior distribution to replace Gaussian noise and learn a vector field to model user preference trajectories. To better align flow matching with the recommendation objective, we further design a single-step alignment loss incorporating both positive and negative samples, improving sampling efficiency and generation quality. Extensive experiments on four benchmark datasets verify the superiority of FlowRec over the state-of-the-art baselines.
Introduction
Sequential Recommendation (SR) is a fundamental task in modern information systems, aiming to predict a user's next interaction based on their historical sequence. While traditional discriminative models like SASRec treat this as a classification problem, recent research has pivoted toward generative approaches. Diffusion Models (DMs) have emerged as a powerful tool for modeling the inherent uncertainty and complexity of user interests.
However, DMs face two primary bottlenecks. First, the "Noise Problem": starting from pure Gaussian noise often obscures the signal from sparse or noisy user histories, particularly for long-tail items. Second, the "Speed Problem": the iterative denoising process requires numerous steps (often 30-50), making real-time deployment challenging. This paper introduces FlowRec, which replaces the stochastic paths of diffusion with deterministic, straight-line "preference trajectories" using Flow Matching.
Methodology
FlowRec shifts the generative paradigm from Stochastic Differential Equations (SDEs) to Ordinary Differential Equations (ODEs) via Flow Matching.
Key Innovations
- Flow Matching (FM): Instead of complex, curved denoising paths, FM learns a vector field that guides the state from an initial distribution to a target distribution along a straight trajectory. This "straightness" simplifies training and significantly accelerates inference.
- Behavior-based Prior: To solve the sensitivity to noise, FlowRec utilizes a Transformer to encode user history into a "latent intent" representation ($x_0$). This personalized prior serves as an informative starting point, replacing the standard uninformative Gaussian noise.
- Single-Step Alignment Loss: While standard FM uses Mean Squared Error (MSE), FlowRec introduces a specialized cross-entropy loss that incorporates positive and negative samples. This ensures the model's predicted endpoint aligns with the actual recommendation objective, improving both efficiency and quality.
Experimental Results
The model was evaluated on four benchmark datasets: Amazon Beauty, Amazon Toys, MovieLens-1M (ML-1M), and Yelp.
Performance and Efficiency
FlowRec consistently outperformed state-of-the-art baselines, including diffusion-based models like DiffuRec. On the Amazon Beauty dataset, FlowRec achieved a 9.87% improvement in HR@5 over the strongest baseline.
Crucially, FlowRec is significantly more efficient. While diffusion models require 30+ steps to reach peak performance, FlowRec achieves optimal results in just 8–10 steps. Even in a single-step configuration, it remains highly competitive. In timing tests on the Yelp dataset, FlowRec demonstrated a 4x speedup in inference compared to DiffuRec.
Trajectory Analysis
The core advantage of FlowRec lies in its ability to model direct preference transitions.
As shown in the trajectory visualizations, FlowRec's paths are notably straighter than the winding paths of diffusion models. This directness is particularly beneficial for "long-tail" items; on the Toys dataset, FlowRec showed a 21.28% improvement for long-tail items compared to DiffuRec, as the behavior-based prior preserves context that random noise would otherwise drown out.
Conclusion
FlowRec represents a significant step forward in generative sequential recommendation. By leveraging Flow Matching to model straight preference trajectories and incorporating a behavior-based prior, it overcomes the speed and noise sensitivity limitations of diffusion models. Future work will explore more advanced ODE solvers and the integration of multi-modal data to further refine the user intent prior.
Summary updated