SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.02443 · 2023

E4SRec: An Elegant Effective Efficient Extensible Solution of Large Language Models for Sequential Recommendation

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 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; 4 failures of our instrument; 2 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/2312.02443.json · badge: /api/ran/2312.02443.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
hestiasky/e4srec canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
MAP_atK Ran
ran; our contract draft was wrong, not the code
hestiasky/e4srec/baseline/eval_utils.py
code served (permissive licence) · get_code("33e43c0f3680591c")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Construct test argument: a list of lists where each inner list represents relevant items for that test case
# For 2 samples, with varying number of relevant items
test = [
    [0, 2, 4],      # sample 0 has 3 relevant items
    [1, 3]          # sample 1 has 2 relevant items
]

# Construct r argument: a 2D numpy array of predictions/scores
# Shape: (num_samples, total_items) where num_samples=2
# This represents prediction scores or binary predictions
# Let's make it (2, 6) so we can test with k values up to 6
r = np.array([
    [1, 0, 1, 0, 1, 0],  # sample 0: predictions for 6 items
    [0, 1, 0, 1, 0, 0]   # sample 1: predictions for 6 items
], dtype=np.float32)

# k: number of top items to consider
k = 4

ARGS = {
    "test": test,
    "r": r,
    "k": k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
MRR_atK Ran
ran; our contract draft was wrong, not the code
hestiasky/e4srec/baseline/eval_utils.py
code served (permissive licence) · get_code("a0f6a1ad87709d01")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Construct valid arguments for MRR_atK function
# The function expects:
# - test: a list/sequence where len(test[i]) gives the length of test set for each sample
# - r: a 2D numpy array of rankings/scores with shape (n_samples, n_items)
# - k: an integer for the cutoff rank

# Create a small test set - list of lists representing relevant items for each query
test = [
    [1, 2, 3],      # Query 0 has 3 relevant items
    [0, 1],         # Query 1 has 2 relevant items
]

# Create ranking scores array with shape (2, 5)
# Rows represent samples, columns represent ranked items
# Values should be binary (0 or 1) or scores indicating relevance
r = np.array([
    [1.0, 1.0, 0.0, 1.0, 0.0],  # Sample 0: 4 items ranked
    [0.0, 1.0, 1.0, 0.0, 0.0],  # Sample 1: 5 items ranked
], dtype=np.float32)

# k is the cutoff rank
k = 3

ARGS = {
    "test": test,
    "r": r,
    "k": k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
RecallPrecision_atK Ran
ran; our contract draft was wrong, not the code
hestiasky/e4srec/baseline/eval_utils.py
code served (permissive licence) · get_code("77a392b61b9f5e4f")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Analyze the function:
# - test: indexed with test[i], len(test) called, len(test[i]) called
#         appears to be a list of lists/arrays where each element has a length
# - r: indexed with r[:, :k], .sum(1) called
#      appears to be a 2D numpy array where first dim is batch, second dim is items
# - k: used as an integer for slicing and division

# Create test: list of variable-length lists representing ground truth items per sample
test = [
    [1, 2, 3],           # sample 0 has 3 relevant items
    [4, 5]                # sample 1 has 2 relevant items
]

# Create r: 2D binary matrix (batch_size x num_items)
# Shape should be (2, 5) - 2 samples, 5 ranking positions
# Values are 1 if item at that position is relevant, 0 otherwise
r = np.array([
    [1, 1, 0, 1, 0],  # sample 0: hits at positions 0, 1, 3
    [0, 1, 1, 0, 0]   # sample 1: hits at positions 1, 2
])

# Create k: cutoff value for precision/recall computation
k = 3

ARGS = {
    "test": test,
    "r": r,
    "k": k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
Yelp Ran
ran; our contract draft was wrong, not the code
hestiasky/e4srec/datasets/code/data_process.py
code served (permissive licence) · get_code("30f6fe477016db7a")
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 list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 json
import tqdm
from unittest.mock import Mock, patch
from datetime import datetime

# Create mock review data that matches the Yelp JSON structure
mock_reviews = [
    json.dumps({
        'user_id': 'user_1',
        'business_id': 'biz_1',
        'stars': 5,
        'date': '2023-01-15 10:30:45'
    }),
    json.dumps({
        'user_id': 'user_2',
        'business_id': 'biz_2',
        'stars': 4,
        'date': '2023-02-20 14:25:30'
    }),
    json.dumps({
        'user_id': 'user_3',
        'business_id': 'biz_3',
        'stars': 3,
        'date': '2023-03-10 09:15:20'
    }),
]

# Patch the file opening to return our mock data
def mock_open_func(filepath):
    class MockFile:
        def readlines(self):
            return mock_reviews
    return MockFile()

# Set up arguments for the Yelp function
date_min = '2023-01-01 00:00:00'
date_max = '2023-12-31 23:59:59'
rating_score = 3.5

ARGS = {
    'date_min': date_min,
    'date_max': date_max,
    'rating_score': rating_score
}

# Apply the patch so the function can read the mock data
import builtins
original_open = builtins.open
builtins.open = mock_open_func
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
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
Amazon Not yet run
unverified (harvested, no recorded run)
hestiasky/e4srec/datasets/code/data_process.py
code served (permissive licence) · get_code("1ce557ccbb42a62f")
How it ran

no invocation recorded.

Amazon_meta Not yet run
unverified (harvested, no recorded run)
hestiasky/e4srec/datasets/code/data_process.py
code served (permissive licence) · get_code("cefdf494535d8de6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

The recent advancements in Large Language Models (LLMs) have sparked interest in harnessing their potential within recommender systems. Since LLMs are designed for natural language tasks, existing recommendation approaches have predominantly transformed recommendation tasks into open-domain natural language generation tasks. However, this approach necessitates items to possess rich semantic information, often generates out-of-range results, and suffers from notably low efficiency and limited extensibility. Furthermore, practical ID-based recommendation strategies, reliant on a huge number of unique identities (IDs) to represent users and items, have gained prominence in real-world recommender systems due to their effectiveness and efficiency. Nevertheless, the incapacity of LLMs to model IDs presents a formidable challenge when seeking to leverage LLMs for personalized recommendations. In this paper, we introduce an Elegant Effective Efficient Extensible solution for large language models for Sequential Recommendation (E4SRec), which seamlessly integrates LLMs with traditional recommender systems that exclusively utilize IDs to represent items. Specifically, E4SRec takes ID sequences as inputs, ensuring that the generated outputs fall within the candidate lists. Furthermore, E4SRec possesses the capability to generate the entire ranking list in a single forward process, and demands only a minimal set of pluggable parameters, which are trained for each dataset while keeping the entire LLM frozen. We substantiate the effectiveness, efficiency, and extensibility of our proposed E4SRec through comprehensive experiments conducted on four widely-used real-world datasets. The implementation code is accessible at https://github.com/HestiaSky/E4SRec/.

For agents

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

get_harvested_code_for_paper("2312.02443")
get_code_for_paper("2312.02443")
have("2312.02443")

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

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

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

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

Connect an agent — have() is free.