On Softmax Direct Preference Optimization for Recommendation

Recommender systems aim to predict personalized rankings based on user preference data. With the rise of Language Models (LMs), LM-based recommenders have been widely explored due to their extensive world knowledge and powerful reasoning abilities. Most of the LM-based recommenders convert historical interactions into language prompts, pairing with a positive item as the target response and fine-tuning LM with a language modeling loss. However, the current objective fails to fully leverage preference data and is not optimized for personalized ranking tasks, which hinders the performance of LM-based recommenders. Inspired by the current advancement of Direct Preference Optimization (DPO) in human preference alignment and the success of softmax loss in recommendations, we propose Softmax-DPO (S-DPO) to instill ranking information into the LM to help LM-based recommenders distinguish preferred items from negatives, rather than solely focusing on positives. Specifically, we incorporate multiple negatives in user preference data and devise an alternative version of DPO loss tailored for LM-based recommenders, which is extended from the traditional full-ranking Plackett-Luce (PL) model to partial rankings and connected to softmax sampling strategies. Theoretically, we bridge S-DPO with the softmax loss over negative sampling and find that it has an inherent benefit of mining hard negatives, which assures its exceptional capabilities in recommendation tasks. Empirically, extensive experiments conducted on three real-world datasets demonstrate the superiority of S-DPO to effectively model user preference and further boost recommendation performance while providing better rewards for preferred items. Our codes are available at https://github.com/chenyuxin1999/S-DPO.

Paper

Similar papers

Peer review

Reviewer 6tmb5/10 · confidence 3/52024-07-09

Summary

This paper extends DPO from pairwise (Bradley-Terry) to multi-way comparison (Plackett-Luce), where one positive example is considered better than multiple negative examples. The paper applies this approach in recommendation systems, showing promising results on several standard benchmarks. From Rafailov et al: “although more general Plackett-Luce ranking models [ 30, 21] are also compatible with the framework if we have access to several ranked answers”. This paper shows the derivation of the Plackett-Luce extension. In that sense the technical contribution is somewhat incremental. I would therefore view this more as an application paper in recommendation systems. However this is not how it is written, most of the focus is on the theoretical analysis extending DPO from Bradley-Terry to Plackett-Luce.

Strengths

* The paper is technically sound and mostly clearly written. * The experimental results look very promising.

Weaknesses

* The technical contribution seems somewhat incremental. * Some points need clarification (see questions below).

Questions

1. It is assumed that there is a single positive example which is better than all the negative ones. In reality, multiple items may satisfy users’ interests, so the negative examples should be chosen with care. In the experiments, how are negative samples chosen? This was not clear from the paper. \ Actually, in recommendations it is natural to show a slate of results and the user would click on one (or more), so the unclicked results can serve as negatives. Though this is not the type of data available in benchmarks used here such as MovieLens. 2. In Fig 2a, it seems like most of the gains in performance already exist in SFT. How come this is much better than other fine-tuned models like LLaRA? 3. Fig 2b: the performance of S-DPO seems to still be improving after 1200 iterations, why not run it longer until it stops improving? Also, since the S-DPO loss and DPO loss are not directly comparable, you should include a figure showing HR@1 as a function of training steps for S-DPO and DPO. 4. Fig 3a: the performance seems to still be increasing, is there a number of samples for which it saturates? 5. MIssing baseline: compare the proposed approach to DPO with pairs consisting of the positive example and each negative example separately (use same negative example choice as S-DPO). This is more computationally expensive but interesting to see how it compares in terms of performance (and runtime). Related to that, it would also be good to include a comparison of runtimes between S-DPO and DPO (perhaps show the above variant of Fig 2b in terms of runtime, not just of training steps). Minor: * L79: empty section * L132: deviate -> deviating * L175: the exp should be with the sum * L180: “faster<space>.”

Rating

5

Confidence

3

Soundness

3

Presentation

3

Contribution

2

Limitations

No societal impact concerns.

Reviewer AMu85/10 · confidence 4/52024-07-12

Summary

proposed a softmax DPO in recommendation domain.

Strengths

1. The paper mainly focus on softmax DPO for recommendation 2. The paper is well wrriten with good experimental validation. 3. The source code is avaliable.

Weaknesses

1. The novely of this work is not high, it seems that they mainly adapt DPO to the recomemndation area, most of the concept are from DPO. 2. what is the complexith of S-DPO, and how can it scale up the large-scale dataset?

Questions

1. The novely of this work is not high, it seems that they mainly adapt DPO to the recomemndation area, most of the concept are from DPO. 2. what is the complexith of S-DPO, and how can it scale up the large-scale dataset?

Rating

5

Confidence

4

Soundness

2

Presentation

3

Contribution

2

Limitations

It is unclear how this framework can scale up to large scale dataset.

Reviewer iyxD5/10 · confidence 3/52024-07-13

Summary

The authors propose a modification to the Direct Preference Optimization (DPO) by incorporating a softmax loss to enhance the training of language model (LM)-based recommender systems.

Strengths

- The paper is well-written. - The mathematical formulations are clear and appreciated. - The proposed method is fairly simple yet effective. - The results are convincing.

Weaknesses

1) Novelty - The use of multiple negatives in recommendation systems is not new and should be cited. Thus, Research Question 2 (RQ2) lacks novelty as it has already been explored. The novelty of using multiple negatives in LM-based recommender systems is uncertain. 2) Statements - Equation 8 represents the softmax loss, which has already been applied in other recommender systems like BERT4Rec, whereas Equation 12 does not represent the softmax loss, leading to confusion. - The claim in lines 225-226 "indicating the significant roles of knowledge and reasoning ability in language models for recommendation tasks." is not provable due to differences in training datasets. - The statement "However, indicated by the low valid ratio and suboptimal performance, untuned LM-based recommenders are limited by inadequate instruction-following capabilities or a lack of domain-specific knowledge" in lines 228-230 is incorrect as evidenced by high ValidRatio scores of ChatRec. 3) Replicability - The prompts used in the experiments are not provided, making replication difficult. 4) Evaluation - NDCG is usually preferred, and metrics like @10 or @20 are more commonly used than @1 in recommendation evaluations. For example, LM-based RecSys works like LLama4Rec use @5. - In Figure 2a, the statistical significance of the results is not specified. It is also unclear why the results are based on LLama and not LLama2. 5) Comparison - The comparison of training epochs between LM-based recommenders (5 epochs) and S-DPO (an additional 3 epochs) is unfair. - In Table 1, the best HR@1 is highlighted in bold, but the same should be done for the ValidRatio column even if your model does not perform the best in that aspect. - The statistical test used should be specified. - Optimizing hyperparameters for the proposed model without doing the same for competitor models is unfair. A fair comparison would involve equal time allocation for hyperparameter searches. - Figure 2b shows that S-DPO decreases faster but remains higher than DPO, making the comparison questionable. Similarly, Figure 2c lacks clarity on whether the values are comparable. -The statement "On the other hand, an excessively large β prevents the model from effectively learning ranking relationships, leading to suboptimal performance" is not supported by Figure 3b and 3c, which show consistent performance improvement. 6) Related work - The related work section is more effective when placed after the introduction to better contextualize the state-of-the-art before presenting the new method. - The discussion on LM for recommendation is not thorough, with many works cited together without detailed descriptions.

Questions

- Consider replacing "side effect" with a more positive synonym. - The methodology section (2) appears empty; clarify if the true (new) methodology starts at section 3.1. - Equation (1) needs clarification as i_p and i_d represent items (identifiers) and not scores nor ranks. - Space before subsection name in line 148 - Line 159: "mutli" --> write "multi" - Clarify lines 174-180 regarding "hard negative items" and the theoretical basis for S-DPO's ability to mine hard negatives. - Section 3.2 is unclear, especially the statement "The structural correlation indicates that DPO and S-DPO are more suitable for recommendation than the language-modeling loss." - The definition of Rel.Ipv should be moved to the caption of Table 1.

Rating

5

Confidence

3

Soundness

2

Presentation

2

Contribution

3

Limitations

- The computational effort required for using more negative samples is not considered. It would be beneficial to compute an approximate empirical complexity of the method. - The use of the Movielens 100K dataset is a limitation due to its small size. A larger dataset like ML-1M would provide better validation while remaining computationally feasible compared to ML-20M.

Authorsrebuttal2024-08-07

**For Reviewer iyxD** I would like to express my gratitude for your detailed review and the valuable feedback provided. >**Comment 1: Uncertain Novelty.** We agree with you that introducing multiple negatives is important and has been widely explored in conventional recommenders, as we briefly discussed in section 3.2. However, as your discovery, LM-based recommenders which has different training paradigm compared with traditional recommenders has just been explored, on which multiple-negatives has largely omitted and lack effectively method to introduce into training pipeline. To our knowledge, we are among the first to point out that multi-negatives is important in LM-based recommenders and propose to effectively instill partial ranking information into LM-based recommenders through an alternated softmax version of DPO. >**Comment 2: Confusing Statement** - Clarification of Equation 12: Equation 12 is also an equivalent variant of the softmax loss, which can be rewritten as: $ E_{(u,i_p,I_d)}\left[{\rm log}\frac{{\rm exp}(f(u,i_p))}{{\rm exp}(f(u,i_p)) + \sum_{i_d \in \mathcal{I}_d}{\rm exp}(f(u,i_d))}\right] $ - We will modify line 225 to "indicating the significant roles of knowledge and reasoning ability in language models for recommendation tasks in semantically informative datasets." - Untuned LM-based recommenders achieve suboptimal performance because of inadequate instruction-following capabilities (reflected by a low valid ratio and a low hit ratio) or lack of domain knowledge (reflected by a high valid ratio but a low hit ratio). ChatRec, with GPT-4 as its backend, falls into the second case. We will modify line 228 to avoid confusion. > **Comment 3: Replicability.** In fact, we have uploaded all the code and prompt used in the anonymous link " https://anonymous.4open.science/r/S-DPO-C8E0" which has been attached in the abstract of submitted manuscripts. We will further include all of our prompts in the appendix. > **Comment 4: Evaluation.** - We calculate further HitRatio and NDCG, please refer to supplementary material (Table 2) for results. - Sorry for leading confusion, the results in Figure 2a is based on LLama2 instead of LLama, which will be modified in the manuscript. > **Comment 5: Statistical Test.** We utilize one-sided t-test for all of our statistical test and find the p value less than 0.05 among all shown experiments. Clarification will be included in implementation details. > **Comment 6: Comparison.** - It has been shown that 5 epochs is enough for model convergence. Follow your suggestions, we conduct SFT for further 3 epochs and results show that it bring no gain to the final performance. - We are adding a dedicated hyperparameter table to provide transparency and demonstrate that each model was given an equal opportunity for optimization. Please refer to supplementary material (Table 1). - **Regarding Figure 2b and 2c**: We further ensure that the validation setting for DPO and S-DPO are consistent, allowing for a direct and fair comparison. The revised results are now included in the supplementary material (Figure 1). We compare loss, relative likelihood and absolute likelihood to validate the effectiveness of S-DPO - **Regarding Figures 3b and 3c**: A very low β overly prioritizes ranking information, compromising the model's ability to follow instructions, as seen in the decreased valid and hit ratios. Conversely, an excessively high β constrains the model too much by the reference model's standards, leading to lower performance (hit ratio@1). A slight increase in valid ratio with β values greater than 1 suggests better adherence to the reference model's constraints, supporting our interpretation. >**Comment 7: Related work.** We agree with your suggestion and we will reorganize our revised version. The lack of in-depth discussion is due to space constraints. We will include a more detailed discussion in the appendix.

Authorsrebuttal2024-08-07

We edit the complexity

>**Comment 8: Unclear section** - **Synonym.** We will replace it with more positive synonym such as "ancillary benefit" in our manuscript. - **Empty section.** Methodology starts at Section 3.1. - **Equation (1).** We will modify the notation "$>_u$" to "$\succ_u$" to better distinguish the comparisons between items according to the preferences of user $u$ from the comparisons between scores or ranks. - **Lines 174-180.** S-DPO treats gradients of different negative (dispreferred) items differently by assigning the gradient of each negative item with an extra term $\frac{1}{\sum_{e_d \in E_d}{\rm exp}(g(e^\prime_d,e_d,x_u))}$=$\frac{{\rm exp}(r_\theta(x_u,e_d))}{\sum_{e^\prime_d\in E_d}{\rm exp}(r_\theta(x_u,e^\prime_d))}$ . This term reflects the relative reward of each negative item compared with other negative items. We can categorize negative items into two categories: (1) Hard negative items , whose reward $r_\theta(x_u,e_d)$ is relatively high, making it more probable to be chosen by LM-based recommenders; (2) Easy negative items, whose reward $r_\theta(x_u,e_d)$ is relatively low, making it less likely to be output. For hard negative items, the extra weight term tends to be larger, leading more decline for likelihood. - **Section 3.2.** "Given effectiveness of BPR and InfoNCE loss in recommendation, we argue that sampled-based loss which explicitly compares preferred and dispreferred items such as DPO and S-DPO is more suitable for training LM-based recommenders than only utilizing language modeling loss." - Rest mistakes will be modified in the revised version, thanks for pointing out. > **Comment 9: Complexity.** $K$ denote the number of negative items. $C_\mathcal{M}$ denote the base model $\mathcal{M}$. $S_t$ denote the size of the S-DPO training set. **Time Complexity** | Methods | S-DPO | DPO | |:------:|:------:|:------:| | Complexity | $ \Theta((K+1)(C_\mathcal{M}+1)S_t) $ | $\Theta(2KC\_\mathcal{M}S\_t)$ |

Authorsrebuttal2024-08-14

Thank you for your time

We sincerely appreciate your valuable comments. Your feedback on direct comparisons and complexity analysis is important for improving our method. We hope our responses have satisfactorily addressed most of your concerns. If this is the case, could we kindly ask you to consider adjusting your score? With the rebuttal period coming to a close, we are eager to discuss any further concerns you might have.

Reviewer gGah4/10 · confidence 4/52024-07-15

Summary

Inspired by advancements in Direct Preference Optimization (DPO) and the success of softmax loss in recommendations, the paper propose Softmax-DPO (S-DPO). S-DPO enhances LM-based sequential recommenders by incorporating multiple negative samples in preference data.The paper demonstrate the superiority of S-DPO in modeling user preferences and boosting recommendation effectiveness.

Strengths

1. DPO, a method that considers preferences in NLP, has been extended to LM-based recommender systems, expanding NLP techniques to the recommender system domain. 2. Building upon related previous work such as reinforcement learning from human feedback (RLHF) and DPO, the motivation and approach of this paper are well-founded.

Weaknesses

In the recommender system domain, considering preferences in the loss function is not particularly new. However, experiments and explanations for this are lacking. 1. There are no experiments comparing S-DPO with other preference-based losses in recommender systems (BPR, InfoNCE, as the paper mentioned ). If such comparisons are not feasible, the reasons for this are insufficiently explained. 2. The experiments lacked the application of S-DPO loss to various base models. Consequently, the general applicability of S-DPO was not demonstrated. 3. Running DPO multiple times and S-DPO appear conceptually similar. Therefore, there are no experiments comparing their efficiency. A comparison of time or memory usage seems necessary.

Questions

Same as weaknesses Is there a justification for not conducting the experiment described above?

Rating

4

Confidence

4

Soundness

3

Presentation

2

Contribution

2

Limitations

LM's methodology was brought to the Recommender system. However, there seems to be a lack of discussion in the Recommender system. BPR loss is typically not used in sequential scenarios, so it would have been beneficial to emphasize that S-DPO specifically addresses preferences in sequential contexts. Additionally, conducting more experiments to validate this aspect would have been advantageous.

Authorsrebuttal2024-08-09

Sorry for leading confusion

We apologize for our mistakes. The revised complexity analysis is as follows: $K$ denotes the number of negative items. $C_\mathcal{M}$ denotes the base model $\mathcal{M}$. $S_t$ denotes the size of the S-DPO training set. **Time Complexity** | Methods | S-DPO | DPO | |:------:|:------:|:------:| | Complexity | $ \Theta((K+1)(C_\mathcal{M}+1)S_t) $ | $\Theta(2KC\_\mathcal{M}S\_t)$ |

Authorsrebuttal2024-08-09

Sorry for leading confusion

We apologize for our mistakes. The revised complexity analysis is as follows: $K$ denotes the number of negative items. $C_\mathcal{M}$ denotes the base model $\mathcal{M}$. $S_t$ denotes the size of the S-DPO training set. **Time Complexity** | Methods | S-DPO | DPO | |:------:|:------:|:------:| | Complexity | $ \Theta((K+1)(C_\mathcal{M}+1)S_t) $ | $\Theta(2KC\_\mathcal{M}S\_t)$ |

Reviewer 6tmb2024-08-12

Thanks for clarifying the point about the loss based on partial ranking being different than PL which is based on full ranking. In that case is it not more similar to a multinomial logit choice model than to PL? Regarding negative sampling, I understand that natural (non-random) negatives are hard to obtain from public benchmarks. You could potentially run a semi-synthetic setting where the recommender presents a slate of items and the user choice is simulated. For example, you can learn a user utility for each item based on past user ratings and then use the utility as a score in the choice model. Thanks for adding experiments with the DPO-neg baseline, I think those should be included in the paper. In 2 out of the 3 settings DPO-neg achieves similar performance -- but with higher computational cost, so you can make that point in the paper.

Authorsrebuttal2024-08-13

Response for new questions

Thanks for your continued interest in our work. For the first comment. Our loss is based on our proposed preference model $p^*(e_p\succ e_d,\forall e_d\in E_d|x_d)=\frac{{\rm exp}(r(e_p,x_u))}{\sum_{j=1}^K{\rm exp}(r_\theta(e_j,x_u))}$, which is derived in the paper from the PL model. In recommendation scenarios, we follow the RLHF pipeline and finally derive this new preference model which possesses a softmax structure similar to a multinomial logit choice model. For the second comment, we agree that it is interesting to explore the effectiveness of natural negatives. Currently, we are working on simulating user choice with LLM to collect simulated behaviors as natural negative samples following your suggestions. The response to this question is on the way, for the necessary time to set up this experiment including training LLM. We will release our results once the experiment is finished. For the last comment, we appreciate your acknowledgment. All the results of additional experiments will be included in the revised version of the paper. If you have additional concerns, we would be more than happy to provide additional clarification. Thank you for your attention.

Authorsrebuttal2024-08-14

Experimental results for natural negatives

Following your suggestion, we employed GPT-4 to simulate user behaviors and used these simulated user choices as natural negatives. The experimental results are as follows: | Method | HitRatio@1 | ValidRatio | | ------ | ---------- | ---------- | | SDPO-random | 0.6609 | 0.9900 | | SDPO-natural | **0.6689** | **0.9916** | The results indicate that incorporating hard negatives is beneficial for S-DPO, highlighting the critical role of negative sampling strategies. We believe that exploring negative sampling is an intriguing direction with significant potential for LM-based recommenders. We appreciate your insightful comments and look forward to further discussion.

Authorsrebuttal2024-08-14

Thank you for your time

We are very grateful for your valuable comments and your continual interest in our work. Your input on natural negatives has been of great assistance in refining our approach and leaving space for future exploration. We hope that our responses have addressed most of your concerns. If they have, we would appreciate it if you could consider revising your score. As the rebuttal period is ending soon, we are eager to further discuss any remaining concerns you may have. Is there anything else you’d like to clarify?

Authorsrebuttal2024-08-09

Sorry for leading confusion about time complexity

We apologize for our mistakes. The revised complexity analysis is as follows: $K$ denotes the number of negative items. $C_\mathcal{M}$ denotes the base model $\mathcal{M}$. $S_t$ denotes the size of the S-DPO training set. **Time Complexity** | Methods | S-DPO | DPO | |:------:|:------:|:------:| | Complexity | $ \Theta((K+1)(C_\mathcal{M}+1)S_t) $ | $\Theta(2KC\_\mathcal{M}S\_t)$ |

Authorsrebuttal2024-08-14

Experimental results on comparing S-DPO with other preference-based losses (BPR and InfoNCe)

It is noted that traditional similarity-based training losses are not well-suited for generative language model-based recommenders, and thus cannot be directly applied in our context. To address this, we adapted BPR and InfoNCE losses within the language model training framework, employing random negative sampling on the LastFM dataset using Llama2-7b. The experimental results are summarized below: | Method | HitRatio@1 | ValidRatio | | ---------- | ---------- | ---------- | | LLAMA2 | 0.0233 | 0.3854 | | LLAMA2-BPR | 0.0008 | 0.0152 | | LLAMA2-InfoNCE | 0.0029 | 0.0246 | | LLAMA2-SDPO | **0.6609** | **0.9900** | From these results, we observe that adapting traditional losses for LM-based recommenders significantly diminishes the inherent capabilities of language models, while also failing to effectively capture domain-specific knowledge. This leads to a marked decrease in both hit ratio and valid ratio. From this experiment, we can see that traditional recommendation losses cannot be directly adapted to LM-based recommenders. Therefore, incorporating explicit ranking information and multiple negative examples into LM-based recommenders is a nontrivial task. S-DPO addresses this challenge by introducing a partial order relationship into PL preference modeling and further deriving the effective loss with softmax structure. We look forward to further discussing these findings with you.

Authorsrebuttal2024-08-14

Thank you for your time

We greatly appreciate your valuable comments. Your insights on various base models and comparisons between DPO and S-DPO have significantly helped us improve our paper. We hope our responses have addressed most of your concerns. If they have, would you consider raising your score? If you have any remaining concerns, we would be eager to discuss them further, especially as the rebuttal period is about to end. Do you have any additional questions?

Authorsrebuttal2024-08-14

Thank you for your time

Thank you very much for your valuable feedback. Your suggestions on complexity comparison have enhanced our method. We hope our replies have resolved most of your concerns. If so, we kindly ask if you might consider revising your score. As the rebuttal period is nearing its end, we would like to discuss any remaining issues you may have. Is there anything else you'd like to discuss?

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC