SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.03988 · 2024

LEARN: Knowledge Adaptation from Large Language Model to Recommendation for Practical Industrial Application

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 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/2405.03988.json · badge: /api/ran/2405.03988.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
adxcreative/LEARN canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
clean_txt Ran
ran; our contract draft was wrong, not the code
adxcreative/LEARN/src/preprocess/amazon_2018/build_product2text.py
code served (permissive licence) · get_code("bda3269ecfd46816")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np

# The function clean_txt takes a string as input and performs character replacements
# It doesn't use any complex objects, just a string parameter

# Create a test string with HTML entities that the function will replace
input_str = "Hello & welcome   <tag> © 2024 — test "quoted""

ARGS = {
    "input_str": input_str
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
cosine_lr Ran
ran; our contract draft was wrong, not the code
adxcreative/LEARN/src/training/scheduler.py
pointer only (licence: MIT); the stored copy get_code serves, from VivienLu/UCAT, is pointer only (licence: NONE) · get_code("932d44bbf8bd0e3f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from VivienLu/UCAT, and GitHub detected no licence in that repository 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.

get_nb_trainable_parameters Ran
ran, honoured the contract we drafted
adxcreative/LEARN/src/training/main_amazon.py
code served (permissive licence) · get_code("958df4f07977d39c")
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 int; 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model with trainable and non-trainable parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Trainable parameters
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        
        # Register a non-trainable parameter
        self.register_parameter('frozen_param', nn.Parameter(torch.randn(5, 6)))
        self.frozen_param.requires_grad = False
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
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 tuple, ndim 1, dtype family int — 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
get_text_description Ran
ran; our contract draft was wrong, not the code
adxcreative/LEARN/src/preprocess/amazon_2018/build_product2text.py
code served (permissive licence) · get_code("663731ce69f8cccf")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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
from tqdm import tqdm

def clean_txt(input_str):
    character_set_to_replace_str = {'&': ' and ', '<': '', '>': '', '&ndash': '', '—': '', ' ': '', ' ': ' ', '­': '', '©': '', '™': '', '®': '', '"': ''}
    for character_set, replace_str in character_set_to_replace_str.items():
        input_str = input_str.replace(character_set, replace_str)
    return input_str

def get_text_description(meta_data):
    clean_meta_data = {}
    for key, value in tqdm(meta_data.items()):
        tmp = {}
        tmp['title'] = clean_txt(value['title'])
        tmp['brand'] = clean_txt(value['brand'])
        tmp['category'] = clean_txt(value['category'])
        clean_meta_data[key] = tmp
    return clean_meta_data

meta_data = {
    'item_1': {
        'title': 'Product & Description with HTML',
        'brand': 'Brand <Name>',
        'category': 'Category © 2024'
    },
    'item_2': {
        'title': 'Another "Product" – Test',
        'brand': 'Brand®',
        'category': 'Category—Type™'
    }
}

ARGS = {
    'meta_data': meta_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
is_master Ran
ran, violated the contract we drafted
adxcreative/LEARN/src/training/main_amazon.py
code served (permissive licence) · get_code("f6406e2db0e6d676")
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 bool, 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

class Args:
    def __init__(self, rank):
        self.rank = rank

ARGS = {
    'args': Args(rank=0)
}
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 bool, 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
setup_primary_logging Ran
ran; our contract draft was wrong, not the code
adxcreative/LEARN/src/training/logger.py
code served (permissive licence) · get_code("e8e252db11d5a8f9")
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 Queue. The image it ran in was not recorded. If your copy returns the same type 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 logging
import tempfile
from logging.handlers import QueueHandler, QueueListener
from torch.multiprocessing import Queue

ARGS = {
    'log_file': tempfile.mktemp(suffix='.log'),
    'level': logging.INFO,
    'rank': 0
}
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 Queue — a Queue output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Queue output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
construct_classification_loss Not yet run
unverified (harvested, no recorded run)
adxcreative/LEARN/src/training/train_amazon.py
code served (permissive licence) · get_code("87eac919f00ed268")
How it ran

no invocation recorded.

construct_contrastive_loss Not yet run
unverified (harvested, no recorded run)
adxcreative/LEARN/src/training/train_amazon.py
code served (permissive licence) · get_code("2f3e4404a7c0a5dd")
How it ran

no invocation recorded.

get_finetune_dataset Not yet run
unverified (harvested, no recorded run)
adxcreative/LEARN/src/training/dataset_amazon.py
code served (permissive licence) · get_code("06e42011523721c3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 8 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
cosine_lr 12 other papers
6 dated earlier, 1 the same month, 5 later
2203.17274 (2022-03)
Exploring Visual Prompts for Adapting Large-Scale Models
2209.00179 (2022-09)
Universal Vision-Language Dense Retrieval: Learning A Unified Representation Space for Multi-Modal Retrieval
2302.14042 (2023-02)
Knowledge-enhanced Visual-Language Pre-training on Chest Radiology Images
and 9 more not named here

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

Contemporary recommendation systems predominantly rely on ID embedding to capture latent associations among users and items. However, this approach overlooks the wealth of semantic information embedded within textual descriptions of items, leading to suboptimal performance and poor generalizations. Leveraging the capability of large language models to comprehend and reason about textual content presents a promising avenue for advancing recommendation systems. To achieve this, we propose an Llm-driven knowlEdge Adaptive RecommeNdation (LEARN) framework that synergizes open-world knowledge with collaborative knowledge. We address computational complexity concerns by utilizing pretrained LLMs as item encoders and freezing LLM parameters to avoid catastrophic forgetting and preserve open-world knowledge. To bridge the gap between the open-world and collaborative domains, we design a twin-tower structure supervised by the recommendation task and tailored for practical industrial application. Through experiments on the real large-scale industrial dataset and online A/B tests, we demonstrate the efficacy of our approach in industry application. We also achieve state-of-the-art performance on six Amazon Review datasets to verify the superiority of our method.

For agents

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

get_harvested_code_for_paper("2405.03988")
get_code_for_paper("2405.03988")
have("2405.03988")

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

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

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

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

Connect an agent — have() is free.