SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.01146 · EMNLP · 2023

NewsRecLib: A PyTorch-Lightning Library for Neural News Recommendation

Heiko Paulheim, Goran Glavas, Andreea Iana

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 0 no recorded run), measured 2026-11-22; 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.01146.json · badge: /api/ran/2310.01146.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
andreeaiana/newsreclib canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
FunctionStatusWhere it lives
diversity Ran
ran; our contract draft was wrong, not the code
andreeaiana/newsreclib/newsreclib/metrics/functional.py
code served (permissive licence) · get_code("fc0fdf51e5b7aaf9")
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.functional as F

torch.manual_seed(0)

# Create small tensors for testing
# preds: estimated probabilities - should be shape (batch_size, num_candidates)
# target: ground truth aspect labels - should be shape (batch_size, num_candidates) or compatible
batch_size = 2
num_candidates = 4
num_classes = 3

# preds: logits/probabilities for each candidate
preds = torch.randn(batch_size, num_candidates)

# target: aspect class labels for each candidate (integers from 0 to num_classes-1)
target = torch.randint(0, num_classes, (batch_size, num_candidates))

ARGS = {
    "preds": preds,
    "target": target,
    "num_classes": num_classes,
    "top_k": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchmetrics — 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
generalized_jaccard Ran
ran; our contract draft was wrong, not the code
andreeaiana/newsreclib/newsreclib/metrics/functional.py
code served (permissive licence) · get_code("bc4f8f1de49d0c9b")
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 1, dtype family float, shape (4,) 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

torch.manual_seed(0)

# Create two probability distributions with shape (batch=2, dim=4)
# These represent estimated and target probability distributions
pred = torch.tensor([
    [0.1, 0.2, 0.3, 0.4],
    [0.2, 0.3, 0.1, 0.4]
], dtype=torch.float32)

target = torch.tensor([
    [0.15, 0.25, 0.25, 0.35],
    [0.1, 0.4, 0.2, 0.3]
], dtype=torch.float32)

ARGS = {
    "pred": pred,
    "target": target,
}
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 1, dtype family float, shape (4,) — shape (4,) 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
get_pylogger Ran
ran; our contract draft was wrong, not the code
andreeaiana/newsreclib/newsreclib/utils/pylogger.py
code served (permissive licence) · get_code("5459c1785979c4ff")
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 Logger. 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
from lightning.pytorch.utilities import rank_zero_only

# The function get_pylogger takes a single optional parameter 'name'
# which defaults to __name__. The function uses this name to get a logger
# and then wraps logging methods with rank_zero_only decorator.
# We just need to provide a string value for the name parameter.

ARGS = {
    "name": "test_logger"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
lightning — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
personalization Ran
ran; our contract draft was wrong, not the code
andreeaiana/newsreclib/newsreclib/metrics/functional.py
code served (permissive licence) · get_code("331fb90b71bc7cd7")
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.functional as F

torch.manual_seed(0)

# Create small tensors for the function parameters
# preds: estimated probabilities - shape (batch_size, num_candidates)
preds = torch.rand(2, 5)  # 2 queries, 5 candidates

# predicted_aspects: aspects of predicted news - shape should be compatible for indexing
# Based on the function, it's indexed by argsort result, so it should have same last dim as preds
predicted_aspects = torch.randint(0, 3, (2, 5))  # 2 queries, 5 candidates, aspect values 0-2

# target_aspects: ground truth aspects - 1D tensor of aspect labels
target_aspects = torch.randint(0, 3, (4,))  # 4 target samples with aspect values 0-2

# num_classes: number of aspect classes
num_classes = 3

# top_k: optional parameter to consider only top k elements
top_k = 3

ARGS = {
    "preds": preds,
    "predicted_aspects": predicted_aspects,
    "target_aspects": target_aspects,
    "num_classes": num_classes,
    "top_k": top_k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchmetrics — 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 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 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 3 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
get_pylogger 14 other papers
3 dated earlier, 2 the same month, 9 later · 1 only as an assembly brick
2209.03143 (2022-09)
AudioLM: a Language Modeling Approach to Audio Generation
2305.14930 (2023-05)
In-Context Impersonation Reveals Large Language Models' Strengths and Biases
2305.20091 (2023-05)
Humans in 4D: Reconstructing and Tracking Humans with Transformers
and 11 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-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

NewsRecLib 1 is an open-source library based on Pytorch-Lightning and Hydra developed for training and evaluating neural news recommendation models. The foremost goals of NewsRecLib are to promote reproducible research and rigorous experimental evaluation by (i) providing a unified and highly configurable framework for exhaustive experimental studies and (ii) enabling a thorough analysis of the performance contribution of different model architecture components and training regimes. NewsRecLib is highly modular, allows specifying experiments in a single configuration file, and includes extensive logging facilities. Moreover, NewsRecLib provides outof-the-box implementations of several prominent neural models, training methods, standard evaluation benchmarks, and evaluation metrics for news recommendation.

For agents

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

get_harvested_code_for_paper("2310.01146")
get_code_for_paper("2310.01146")
have("2310.01146")

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

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

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

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

Connect an agent — have() is free.