SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.13117 · ICLR · 2025

Preference Diffusion for Recommendation

Hong Qian, An Zhang, Tat-Seng Chua, Shuo Liu, Guoqing Hu

arXiv · PDF · Open in the Atlas

Code that ran

15 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 5 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.13117.json · badge: /api/ran/2410.13117.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
lswhim/PreferDiff canonical (classifier label)
classifier basis: census
1 ran · 0 no recorded run
lswhim/preferdiff community
Papers with Code archive
10 ran · 4 no recorded run
copy not recorded community
not in the paper's declared repositories
4 ran · 0 no recorded run
FunctionStatusWhere it lives
AbstractModel Ran
ran on a synthesized input · constructed an object; no result was computed
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("9cee7b29292819c9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

BaseDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("94f2a9e6aa1676eb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

MultiHeadAttention Ran
ran on a synthesized input · constructed an object; no result was computed
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("63814a6938fa994f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

PositionwiseFeedForward Ran
ran on a synthesized input · constructed an object; no result was computed
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("89f25d4ab4d600e3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

SinusoidalPositionEmbeddings Ran
ran on a synthesized input · constructed an object; no result was computed
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("2b5245040c13c182")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

TransformerEncoder Ran
ran on a synthesized input
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("f63384aa09f6504a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

betas_for_alpha_bar Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from blt2114/twisted_diffusion_sampler
pointer only; the stored copy get_code serves, from blt2114/twisted_diffusion_sampler, is pointer only (licence: NONE) · get_code("6cdc8772f5db6f48")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cosine_beta_schedule Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from maowenyu-11/TDM
pointer only; the stored copy get_code serves, from maowenyu-11/TDM, is pointer only (licence: NONE) · get_code("3a6233722b4f0cd6")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

diagonalize_and_scale Ran
ran; our contract draft was wrong, not the code
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("3cc2ff4c20cc6053")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

exp_beta_schedule Ran
ran, honoured the contract we drafted
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("2c8cfbc6db313670")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from maowenyu-11/TDM
pointer only; the stored copy get_code serves, from maowenyu-11/TDM, is pointer only (licence: NONE) · get_code("df116dde4bb6ab3e")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_axis_1 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("dc3094c7e25c1afa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

in_batch_negative_sampling_sample Ran
ran; our contract draft was wrong, not the code
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("4675e6612ba76877")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

linear_beta_schedule Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from maowenyu-11/TDM
pointer only; the stored copy get_code serves, from maowenyu-11/TDM, is pointer only (licence: NONE) · get_code("4b3d941e8a7485c5")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse_command_line_args Ran
ran; our contract draft was wrong, not the code
lswhim/PreferDiff/utils.py
pointer only (licence: NONE) · get_code("351f47117a6acd3b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/PreferDiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

PreferDiff Not yet run
unverified (harvested, no recorded run)
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("5d6aca7f0ee74315")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

PreferenceDiffusion Not yet run
unverified (harvested, no recorded run)
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("7d68851af1d4f86e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

SASRec Not yet run
unverified (harvested, no recorded run)
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("c250ef81a5f76f3c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

in_batch_negative_sampling Not yet run
unverified (harvested, no recorded run)
lswhim/preferdiff/models/PreferDiff/_model.py
pointer only (licence: NONE) · get_code("3d3f56b8afc1b831")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lswhim/preferdiff when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 2 the same month, 4 later) and 13 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
betas_for_alpha_bar
brick of this paper's assembly: helper
92 other papers
81 dated earlier, 9 later, 2 same year, order not determinable · 3 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2102.09672 (2021-02)
Improved Denoising Diffusion Probabilistic Models
and 89 more not named here
cosine_beta_schedule
brick of this paper's assembly: helper
9 other papers
5 dated earlier, 1 the same month, 3 later
2306.06874 (2023-06)
VillanDiffusion: A Unified Backdoor Attack Framework for Diffusion Models
2307.11494 (2023-07)
Predict, Refine, Synthesize: Self-Guiding Diffusion Models for Probabilistic Time Series Forecasting
2309.01745 (2023-09)
Benchmarking Autoregressive Conditional Diffusion Models for Turbulent Flow Simulation
and 6 more not named here
extract
brick of this paper's assembly: helper
9 other papers
4 dated earlier, 2 the same month, 2 later, 1 same year, order not determinable · 1 only as an assembly brick
2303.17839 (2023-03)
Learning Procedure-aware Video Representation from Instructional Videos and Their Narrations
2307.11494 (2023-07)
Predict, Refine, Synthesize: Self-Guiding Diffusion Models for Probabilistic Time Series Forecasting
2310.20487 (2023-10)
Large Language Model Can Interpret Latent Space of Sequential Recommender
and 6 more not named here
SinusoidalPositionEmbeddings
brick of this paper's assembly: model
3 other papers
3 dated earlier
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2303.17839 (2023-03)
Learning Procedure-aware Video Representation from Instructional Videos and Their Narrations
2312.02966 (2023-12)
Diffusion-SS3D: Diffusion Model for Semi-supervised 3D Object Detection
linear_beta_schedule
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2310.20487 (2023-10)
Large Language Model Can Interpret Latent Space of Sequential Recommender
2505.12283 (2025-05)
Addressing Missing Data Issue for Diffusion-based Recommendation
PositionwiseFeedForward
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1706.03762 (2017-06)
Attention Is All You Need

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recommender systems aim to predict personalized item rankings by modeling user preference distributions derived from historical behavior data. While diffusion models (DMs) have recently gained attention for their ability to model complex distributions, current DM-based recommenders typically rely on traditional objectives such as mean squared error (MSE) or standard recommendation objectives. These approaches are either suboptimal for personalized ranking tasks or fail to exploit the full generative potential of DMs. To address these limitations, we propose Prefer-Diff, an optimization objective tailored for DM-based recommenders. PreferDiff reformulates the traditional Bayesian Personalized Ranking (BPR) objective into a log-likelihood generative framework, enabling it to effectively capture user preferences by integrating multiple negative samples. To handle the intractability, we employ variational inference, minimizing the variational upper bound. Furthermore, we replace MSE with cosine error to improve alignment with recommendation tasks, and we balance generative learning and preference modeling to enhance the training stability of DMs. PreferDiff devises three appealing properties. First, it is the first personalized ranking loss designed specifically for DM-based recommenders. Second, it improves ranking performance and accelerates convergence by effectively addressing hard negatives. Third, we establish its theoretical connection to Direct Preference Optimization (DPO), demonstrating its potential to align user preferences within a generative modeling framework. Extensive experiments across six benchmarks validate PreferDiff's superior recommendation performance. Our codes are available at https://github.com/lswhim/PreferDiff.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.13117")
get_code_for_paper("2410.13117")
have("2410.13117")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2410.13117.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2410.13117.svg)](https://syntology.ai/paper/2410.13117)

Connect an agent — have() is free.