{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/psl-rethinking-and-improving-softmax-loss","title":"PSL: Rethinking and Improving Softmax Loss from Pairwise Perspective for Recommendation","arxiv_id":"2411.00163","date":"2024-10-31","proceeding":null,"authors":["Weiqin Yang","Jiawei Chen","Xin Xin","Sheng Zhou","Binbin Hu","Yan Feng","Chun Chen","Can Wang"],"abstract":"Softmax Loss (SL) is widely applied in recommender systems (RS) and has demonstrated effectiveness. This work analyzes SL from a pairwise perspective, revealing two significant limitations: 1) the relationship between SL and conventional ranking metrics like DCG is not sufficiently tight; 2) SL is highly sensitive to false negative instances. Our analysis indicates that these limitations are primarily due to the use of the exponential function. To address these issues, this work extends SL to a new family of loss functions, termed Pairwise Softmax Loss (PSL), which replaces the exponential function in SL with other appropriate activation functions. While the revision is minimal, we highlight three merits of PSL: 1) it serves as a tighter surrogate for DCG with suitable activation functions; 2) it better balances data contributions; and 3) it acts as a specific BPR loss enhanced by Distributionally Robust Optimization (DRO). We further validate the effectiveness and robustness of PSL through empirical experiments. The code is available at https://github.com/Tiny-Snow/IR-Benchmark.","url_abs":"https://arxiv.org/abs/2411.00163v1","url_pdf":"https://arxiv.org/pdf/2411.00163v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"psl-rethinking-and-improving-softmax-loss","repo_url":"https://github.com/tiny-snow/ir-benchmark","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}}],"tasks":[{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"}],"methods":[{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2411.00163","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.00163"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tiny-snow/ir-benchmark","reach":{"status":"ok","spdx":"GPL-3.0"}}],"summary":{"unverified":4},"by_repo_kind":{"official":{"samples":4,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":4,"samples":[{"code_sha256_prefix":"d12e26e7827c0f89","entry":"eval_precision","repo":"tiny-snow/ir-benchmark","repo_kind":"official","path":"src/itemrec/metrics/metrics.py","file_url":"https://github.com/tiny-snow/ir-benchmark/blob/HEAD/src/itemrec/metrics/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d12e26e7827c0f89"}},{"code_sha256_prefix":"601ab78a6884e24f","entry":"get_search_space","repo":"tiny-snow/ir-benchmark","repo_kind":"official","path":"src/itemrec/hyper.py","file_url":"https://github.com/tiny-snow/ir-benchmark/blob/HEAD/src/itemrec/hyper.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"601ab78a6884e24f"}},{"code_sha256_prefix":"5438b7d5d6de91e6","entry":"merge_args","repo":"tiny-snow/ir-benchmark","repo_kind":"official","path":"src/itemrec/args.py","file_url":"https://github.com/tiny-snow/ir-benchmark/blob/HEAD/src/itemrec/args.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5438b7d5d6de91e6"}},{"code_sha256_prefix":"4c00336833eddf76","entry":"preserve_torch_seed","repo":"tiny-snow/ir-benchmark","repo_kind":"official","path":"src/itemrec/metrics/metrics.py","file_url":"https://github.com/tiny-snow/ir-benchmark/blob/HEAD/src/itemrec/metrics/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"4c00336833eddf76"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}