SFMD: a stable and efficient flow-matching framework for sequential recommendation
摘要
Sequential Recommendation (SR) aims to model users’ evolving interests and predict their next actions. Flow Matching (FM) has recently emerged as a promising paradigm for sequential recommendation, as its deterministic dynamics and few-step inference capability can help alleviate the error accumulation and sampling noise commonly encountered in traditional generative models. However, existing FM-based SR studies mainly focus on generative modeling, while paying limited attention to discrimination in the final ranking stage, stability degradation caused by the mismatch between training and inference steps, and the modeling of users’ short-term preference drift. Consequently, directly applying FM to SR still faces three key challenges: insufficient discrimination among highly similar candidate items, inconsistency between training and inference steps, and inadequate modeling of short-term interest variation. To address these challenges, we propose Stable Flow Matching with Contrastive Discriminant (SFMD), a unified enhancement framework for FM-based SR. SFMD adapts contrastive learning, distillation, and temporal weighting to these FM-specific bottlenecks. Specifically, it introduces a contrastive discriminant objective to improve the separability of similar targets and enhance ranking accuracy, a Mean-Teacher Single-Step Distillation (MT-SD) strategy to alleviate the mismatch between training and inference steps and improve model stability, and a relative-position exponential decay kernel to incorporate recency priors for better modeling of short-term user preference dynamics. These components are integrated to improve ranking discrimination, dynamics consistency, and temporal adaptation while preserving the efficient inference path of FM. Experimental results on four public datasets show that SFMD consistently outperforms seven baseline methods, achieving an average improvement of 7.94% over state-of-the-art methods. Further full-factorial ablation studies verify the individual contributions and coordinated effects of the three components, demonstrating that the full framework achieves the best overall performance.