Abstract
Recently, deep learning has made significant progress in the task of sequential recommendation. Existing neural sequential recommenders typically adopt a generative way trained with Maximum Likelihood Estimation (MLE). When context information (called factor) is involved, it is difficult to analyze when and how each individual factor would affect the final recommendation performance. For this purpose, we take a new perspective and introduce adversarial learning to sequential recommendation. In this paper, we present a Multi-Factor Generative Adversarial Network (MFGAN) for explicitly modeling the effect of context information on sequential recommendation. Specifically, our proposed MFGAN has two kinds of modules: a Transformer-based generator taking user behavior sequences as input to recommend the possible next items, and multiple factor-specific discriminators to evaluate the generated sub-sequence from the perspectives of different factors. To learn the parameters, we adopt the classic policy gradient method, and utilize the reward signal of discriminators for guiding the learning of the generator. Our framework is flexible to incorporate multiple kinds of factor information, and is able to trace how each factor contributes to the recommendation decision over time. Extensive experiments conducted on three real-world datasets demonstrate the superiority of our proposed model over the state-of-the-art methods, in terms of effectiveness and interpretability.
Introduction
Sequential recommendation systems aim to predict the next item a user will interact with by analyzing their historical behavior. While deep learning models like GRU4Rec and SASRec have significantly improved performance, they predominantly rely on Maximum Likelihood Estimation (MLE). MLE training often leads to "exposure bias," where the model is only exposed to ground-truth sequences during training and may fail to generalize to the vast space of unobserved sequences. Furthermore, when contextual "factors"—such as item category, price, or brand—are integrated, they are typically fused into a single latent representation. This "black-box" approach obscures the influence of individual factors on the final recommendation.
To address these challenges, we propose the Multi-Factor Generative Adversarial Network (MFGAN). By leveraging adversarial learning, MFGAN decouples item prediction from contextual factors, providing both improved accuracy and a higher degree of interpretability.
The MFGAN Framework
The core of MFGAN is a game between a generator and multiple discriminators.
The Generator ($G$)
The generator is a unidirectional Transformer-based model. It processes a sequence of item IDs to generate a probability distribution for the next item. By focusing solely on item IDs, the generator learns the fundamental sequential patterns of user behavior.
Multiple Discriminators ($D$)
Unlike standard GANs that use a single discriminator, MFGAN employs a set of factor-specific discriminators. Each discriminator is an "expert" that evaluates the generated sequence based on a specific attribute (e.g., category, popularity, or price). These discriminators utilize bi-directional Transformers, allowing them to assess the "rationality" of a recommended item by looking at both preceding and succeeding items in a sequence.
Training via Policy Gradient
Because item selection is a discrete operation, standard backpropagation cannot be used to train the generator against the discriminators. Instead, we employ the Policy Gradient method. The generator acts as an agent in a reinforcement learning environment, where its "action" is the selection of the next item. The discriminators provide a reward signal based on how plausible the generated sequence appears from the perspective of their respective factors. A high consensus among discriminators leads to a stronger positive reward, guiding the generator toward more realistic recommendations.
Experimental Evaluation
We evaluated MFGAN on three diverse real-world datasets: MovieLens-1M (movies), Yahoo! Music (music), and Steam (games). Each dataset included various contextual factors such as category, artist, popularity, and price.
Performance and Interpretability
MFGAN consistently outperformed state-of-the-art baselines, including SASRec and GRU4Rec. For instance, on the MovieLens-1M dataset, MFGAN achieved an NDCG@10 of 0.6185, compared to 0.5849 for SASRec.
Beyond raw performance, the multi-adversarial approach offers unique interpretability. By monitoring the rewards provided by each discriminator over time, we can identify which factor is most influential at any given step in a user's journey. This allows us to see, for example, when a user transitions from following a popular trend to exploring a specific niche category.
Ablation Study
To verify the contribution of each factor, we conducted ablation studies by removing individual discriminators. As shown in the results below, the "Complete" model (incorporating all factors) consistently achieves the best performance. Removing any single factor-specific discriminator leads to a drop in accuracy, confirming that each contextual attribute provides unique and valuable signals for recommendation.
Conclusion and Future Work
MFGAN represents a significant step toward more robust and interpretable sequential recommendation. By decoupling contextual factors into separate discriminators, we mitigate exposure bias and gain insights into user decision-making processes. Future research will explore more efficient ways to share knowledge between discriminators and the integration of explicit long-term user profiles to further refine the adversarial reward signal.
Summary updated