SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2025.findings-emnlp.538 · EMNLP Findings · 2025

SOLAR: Serendipity Optimized Language Model Aligned for Recommendation

Yue Wang, Siyuan Li, Jiaqi Chen, Xinyuan Song, Lifan Sun, Sirui Hong, Yongxin Ni, Tianqi Xu, Zichen Yuan, Yucen Zhuang, Junchen Fu, Joemon Jose, and 1 more

Open in the Atlas

Code that ran

5 of 8 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; 3 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-24; 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/2025.findings-emnlp.538.json · badge: /api/ran/2025.findings-emnlp.538.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
SOLAR2025ARR/SOLAR canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
str2bool Ran
ran, violated the contract we drafted
SOLAR2025ARR/SOLAR/datagen/train_id_model.py
pointer only (licence: MIT); the stored copy get_code serves, from rlqja1107/nl-vsgg, is pointer only (licence: NONE) · get_code("7aef2a8cb287a30b")
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 rlqja1107/nl-vsgg, 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.

prepare_dataset Ran
ran; our contract draft was wrong, not the code
SOLAR2025ARR/SOLAR/datagen/llm_rerank.py
code served (permissive licence) · get_code("0588343b65e27435")
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. 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 pandas as pd
import tempfile
import os

# Create temporary CSV files with the expected structure
temp_dir = tempfile.mkdtemp()

# Create title_path CSV
title_data = {
    'item': [1, 2, 3, 4, 5],
    'title': ['Movie A', 'Movie B', 'Movie C', 'Movie D', 'Movie E']
}
title_df = pd.DataFrame(title_data)
title_path = os.path.join(temp_dir, 'titles.csv')
title_df.to_csv(title_path, index=False)

# Create recommendation_result_path CSV
recommendation_data = {
    'history': ['1 2', '2 3 4'],
    'topk_items': ['3 4 5', '1 5'],
    'target': [5, 1]
}
recommendation_df = pd.DataFrame(recommendation_data)
recommendation_result_path = os.path.join(temp_dir, 'recommendations.csv')
recommendation_df.to_csv(recommendation_result_path, index=False)

ARGS = {
    'recommendation_result_path': recommendation_result_path,
    'title_path': title_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
random_neq Ran
ran, honoured the contract we drafted
SOLAR2025ARR/SOLAR/datagen/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from nancheng58/recmamba, is pointer only (licence: NONE) · get_code("13e1db5681123f3a")
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 nancheng58/recmamba, 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.

sample_from_dataset Ran
ran; our contract draft was wrong, not the code
SOLAR2025ARR/SOLAR/datagen/llm_rerank.py
code served (permissive licence) · get_code("b570c1889d4eba61")
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. 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 numpy as np
from typing import List, Tuple

# Construct the dataset structure
# dataset is a Tuple of:
# 1. List[List[Tuple[int, str]]] - histories
# 2. List[List[Tuple[int, str]]] - candidate_lists
# 3. List[Tuple[int, str]] - target_items

histories = [
    [(1, "item_a"), (2, "item_b")],
    [(3, "item_c"), (4, "item_d")],
    [(5, "item_e"), (6, "item_f")],
    [(7, "item_g"), (8, "item_h")],
    [(9, "item_i"), (10, "item_j")]
]

candidate_lists = [
    [(11, "cand_a"), (12, "cand_b")],
    [(13, "cand_c"), (14, "cand_d")],
    [(15, "cand_e"), (16, "cand_f")],
    [(17, "cand_g"), (18, "cand_h")],
    [(19, "cand_i"), (20, "cand_j")]
]

target_items = [
    (21, "target_a"),
    (22, "target_b"),
    (23, "target_c"),
    (24, "target_d"),
    (25, "target_e")
]

dataset = (histories, candidate_lists, target_items)

ARGS = {
    "dataset": dataset,
    "k": 3
}
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 — a tuple output has no array shape of its own; none is 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
str_tuple_list Ran
ran; our contract draft was wrong, not the code
SOLAR2025ARR/SOLAR/datagen/llm_rerank.py
code served (permissive licence) · get_code("95a5caa0d0820a54")
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
from typing import List, Tuple

torch.manual_seed(0)

# Construct a list of tuples with (int, str) pairs
l = [
    (1, "First Title"),
    (2, "Second Title"),
    (3, "Third Title")
]

ARGS = {
    "l": l
}
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
convert_indices_to_titles Not yet run
unverified (harvested, no recorded run)
SOLAR2025ARR/SOLAR/datagen/instgen/UserAsyn.py
code served (permissive licence) · get_code("b4f6a4d8be1a1abc")
How it ran

no invocation recorded.

data_partition Not yet run
unverified (harvested, no recorded run)
SOLAR2025ARR/SOLAR/datagen/utils.py
code served (permissive licence) · get_code("1b69c63b5f0ea1a6")
How it ran

no invocation recorded.

sample_function Not yet run
unverified (harvested, no recorded run)
SOLAR2025ARR/SOLAR/datagen/utils.py
code served (permissive licence) · get_code("407a2c94fe4e74bb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 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.

FunctionAlso present inEarliest-datedOthers named
random_neq 7 other papers
7 dated earlier
1808.09781 (2018-08)
Self-Attentive Sequential Recommendation
2002.07962 (2020-02)
Inductive Representation Learning on Temporal Graphs
2204.06517 (2022-04)
Learning Self-Modulating Attention in Continuous Time Space with Applications to Sequential Recommendation
and 4 more not named here
str2bool 3 other papers
2 dated earlier, 1 same year, order not determinable
2401.02913 (2024-01)
Plug-In Diffusion Model for Sequential Recommendation
2409.17476 (2024-09)
Improving the Shortest Plank: Vulnerability-Aware Adversarial Training for Robust Recommender System
2502.15370 (2025-02)
Weakly Supervised Video Scene Graph Generation via Natural Language Supervision

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

Repositories linked to this paper

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

Abstract

Recently, Large Language Models (LLMs) have shown strong potential in recommendation tasks due to their broad world knowledge and reasoning capabilities. However, applying them to serendipity-oriented recommendation remains challenging, mainly due to a domain gap of LLMs in modeling personalized user behavior and the scarcity of labeled serendipitous interactions. In this paper, we introduce SOLAR (Serendipity-Optimized Language model Aligned for Recommendation), a two-stage framework that addresses these challenges. To alleviate label scarcity, we adopt a weak supervision strategy: a sequential ID-based recommender generates candidate items, which are then reranked by an LLM acting as a preference judge to produce serendipity-aware pseudo-labels. To bridge the domain gap, we propose a domain-adaptive instruction tuning method (SUN) that aligns LLMs with recommendation tasks. Experiments on three real-world datasets show that SOLAR consistently improves both accuracy and serendipity over strong baselines, showing its effectiveness in enabling more diverse, user-centric recommendations. Code and dataset are released at https://github.com/SOLAR2025ARR/SOLAR.

For agents

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

get_harvested_code_for_paper("2025.findings-emnlp.538")
get_code_for_paper("2025.findings-emnlp.538")
have("2025.findings-emnlp.538")

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

curl https://syntology.ai/api/ran/2025.findings-emnlp.538.json

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

[![Syntology run record](https://syntology.ai/api/ran/2025.findings-emnlp.538.svg)](https://syntology.ai/paper/2025.findings-emnlp.538)

Connect an agent — have() is free.