SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.15950 · 2023

Representation Learning with Large Language Models for Recommendation

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2310.15950.json · badge: /api/ran/2310.15950.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
hkuds/rlmrec canonical (classifier label)
classifier basis: plan_row
3 ran · 0 no recorded run
FunctionStatusWhere it lives
cal_bpr_loss Ran
ran; our contract draft was wrong, not the code
hkuds/rlmrec/encoder/models/loss_utils.py
code served (permissive licence) · get_code("cd4d6f0dfe206af5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch as t

t.manual_seed(0)

# The function performs BPR loss calculation:
# - Takes anchor, positive, and negative embeddings
# - Computes dot products between anchor-positive and anchor-negative
# - Applies softplus to the difference and sums
# All three parameters are tensors that get element-wise multiplied and summed

batch_size = 2
embedding_dim = 4

# Create small embedding tensors
anc_embeds = t.randn(batch_size, embedding_dim)
pos_embeds = t.randn(batch_size, embedding_dim)
neg_embeds = t.randn(batch_size, embedding_dim)

ARGS = {
    "anc_embeds": anc_embeds,
    "pos_embeds": pos_embeds,
    "neg_embeds": neg_embeds,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cal_infonce_loss Ran
ran; our contract draft was wrong, not the code
hkuds/rlmrec/encoder/models/loss_utils.py
code served (permissive licence) · get_code("10cceeafaaa7f740")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch as t

t.manual_seed(0)

# embeds1: shape (batch_size, embedding_dim) - positive pair from view 1
embeds1 = t.randn(2, 4)

# embeds2: shape (batch_size, embedding_dim) - positive pair from view 2
embeds2 = t.randn(2, 4)

# all_embeds2: shape (num_samples, embedding_dim) - all negative samples from view 2
# Using larger batch to have negatives distinct from positives
all_embeds2 = t.randn(5, 4)

# temp: temperature parameter for scaling
temp = 0.5

ARGS = {
    "embeds1": embeds1,
    "embeds2": embeds2,
    "all_embeds2": all_embeds2,
    "temp": temp,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
reg_pick_embeds Ran
ran; our contract draft was wrong, not the code
hkuds/rlmrec/encoder/models/loss_utils.py
code served (permissive licence) · get_code("16b97391a1758fda")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function expects embeds_list: a list of tensors
# It iterates over each tensor, calls .square() and .sum() on them
# So we need a list of 2D tensors (embeddings)

embeds_1 = torch.randn(2, 4)  # batch_size=2, embedding_dim=4
embeds_2 = torch.randn(2, 4)
embeds_3 = torch.randn(2, 4)

embeds_list = [embeds_1, embeds_2, embeds_3]

ARGS = {
    "embeds_list": embeds_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 3 later) and 0 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
cal_bpr_loss 4 other papers
1 dated earlier, 3 later
2308.05697 (2023-08)
SSLRec: A Self-Supervised Learning Framework for Recommendation
2024.findings-emnlp.22 (2024 (year only))
XRec: Large Language Models for Explainable Recommendation
2506.21579 (2025-06)
LLM2Rec: Large Language Models Are Powerful Embedding Models for Sequential Recommendation
and 1 more not named here
reg_pick_embeds 4 other papers
1 dated earlier, 3 later
2308.05697 (2023-08)
SSLRec: A Self-Supervised Learning Framework for Recommendation
2024.findings-emnlp.22 (2024 (year only))
XRec: Large Language Models for Explainable Recommendation
2506.21579 (2025-06)
LLM2Rec: Large Language Models Are Powerful Embedding Models for Sequential Recommendation
and 1 more not named here
cal_infonce_loss 1 other paper
1 later
2603.16236 (2026-03)
ReFORM: Review-aggregated Profile Generation via LLM with Multi-Factor Attention for Restaurant Recommendation

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-22.

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 have seen significant advancements with the influence of deep learning and graph neural networks, particularly in capturing complex user-item relationships. However, these graph-based recommenders heavily depend on ID-based data, potentially disregarding valuable textual information associated with users and items, resulting in less informative learned representations. Moreover, the utilization of implicit feedback data introduces potential noise and bias, posing challenges for the effectiveness of user preference learning. While the integration of large language models (LLMs) into traditional ID-based recommenders has gained attention, challenges such as scalability issues, limitations in text-only reliance, and prompt input constraints need to be addressed for effective implementation in practical recommender systems. To address these challenges, we propose a model-agnostic framework RLMRec that aims to enhance existing recommenders with LLM-empowered representation learning. It proposes a recommendation paradigm that integrates representation learning with LLMs to capture intricate semantic aspects of user behaviors and preferences. RLMRec incorporates auxiliary textual signals, develops a user/item profiling paradigm empowered by LLMs, and aligns the semantic space of LLMs with the representation space of collaborative relational signals through a cross-view alignment framework. This work further establish a theoretical foundation demonstrating that incorporating textual signals through mutual information maximization enhances the quality of representations. In our evaluation, we integrate RLMRec with state-of-the-art recommender models, while also analyzing its efficiency and robustness to noise data. Our implementation codes are available at https://github.com/HKUDS/RLMRec.

For agents

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

get_harvested_code_for_paper("2310.15950")
get_code_for_paper("2310.15950")
have("2310.15950")

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

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

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

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

Connect an agent — have() is free.