SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1904.10367 · 2019

Contextual Hybrid Session-based News Recommendation with Recurrent Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 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 8 have no contract verdict; 0 failures of our instrument; 5 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/1904.10367.json · badge: /api/ran/1904.10367.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
13520505/bigdataproj community (classifier label)
classifier basis not recorded on the link
8 ran · 5 no recorded run
FunctionStatusWhere it lives
create_multihot_feature Ran
ran on a synthesized input
13520505/bigdataproj/acr_module/acr/acr_trainer_adressa.py
code served (permissive licence) · get_code("b1262d05e68037c0")
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 IndicatorColumn. 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 tensorflow as tf

# Create minimal valid arguments for create_multihot_feature

# features: This parameter is not actually used in the function body,
# so we can pass a simple placeholder
features = {}

# column_name: A string key for the feature column
column_name = "test_feature"

# features_config: A dict with the structure expected by the function
# The function accesses features_config['sequence_features'][column_name]['cardinality']
features_config = {
    'sequence_features': {
        'test_feature': {
            'cardinality': 10
        }
    }
}

ARGS = {
    'features': features,
    'column_name': column_name,
    'features_config': features_config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IndicatorColumn — a IndicatorColumn output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a IndicatorColumn output the recorded ndim 2 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
deflate_and_split_features_label Ran
ran on a synthesized input
13520505/bigdataproj/acr_module/acr/acr_datasets.py
code served (permissive licence) · get_code("1d3ebe32f3d85df2")
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 tensorflow as tf
import numpy as np

# Create a small features dictionary with TensorFlow tensors
features = {
    'feature_1': tf.constant([[[1.0], [2.0]], [[3.0], [4.0]]], dtype=tf.float32),  # shape (2, 2, 1)
    'feature_2': tf.constant([[[5.0], [6.0]], [[7.0], [8.0]]], dtype=tf.float32),  # shape (2, 2, 1)
    'label_1': tf.constant([[0.5], [1.5]], dtype=tf.float32),  # shape (2, 1)
    'label_2': tf.constant([[2.5], [3.5]], dtype=tf.float32),  # shape (2, 1)
}

# Create a features_config dictionary
features_config = {
    'single_features': ['feature_1', 'feature_2'],  # features to deflate (squeeze)
    'label_features': ['label_1', 'label_2']  # features that are labels
}

ARGS = {
    'features': features,
    'features_config': features_config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — 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
extract_date Ran
ran on a synthesized input
13520505/bigdataproj/acr_module/acr/acr_module_service.py
code served (permissive licence) · get_code("7e4661df8bdf7b04")
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 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 re

def extract_date(string):
    return re.findall('\\d+', string)

ARGS = {
    'string': 'The meeting is on 2024-01-15 at 3:30 PM'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, 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
get_all_file Ran
ran on a synthesized input
13520505/bigdataproj/acr_module/acr/acr_module_service.py
code served (permissive licence) · get_code("47d93e7f6ea9d8f3")
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 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 os
import tempfile
import shutil

# Create a temporary directory structure with test files
temp_dir = tempfile.mkdtemp()

# Create subdirectories
os.makedirs(os.path.join(temp_dir, "subdir1"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir2"), exist_ok=True)

# Create test files with the relevant extensions
open(os.path.join(temp_dir, "file1.pickle"), 'w').close()
open(os.path.join(temp_dir, "file2.csv"), 'w').close()
open(os.path.join(temp_dir, "subdir1", "file3.tfrecord"), 'w').close()
open(os.path.join(temp_dir, "subdir1", "file4.pickle"), 'w').close()
open(os.path.join(temp_dir, "subdir2", "file5.csv"), 'w').close()
open(os.path.join(temp_dir, "file_ignore.txt"), 'w').close()

ARGS = {
    "path": temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, 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
get_label_features Ran
ran on a synthesized input
13520505/bigdataproj/acr_module/acr/acr_datasets.py
code served (permissive licence) · get_code("a07ace8f2d55201a")
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
import torch.nn as nn

torch.manual_seed(0)

# The function expects:
# 1. features: a dict where keys are feature names and values are the feature data
# 2. features_config: a dict with a 'label_features' key containing a list/set of feature names to filter

# Create a features dict with some sample features
features = {
    'feature_1': torch.randn(2, 4),
    'feature_2': torch.randn(2, 4),
    'feature_3': torch.randn(2, 4),
    'feature_4': torch.randn(2, 4),
}

# Create a features_config dict with label_features specifying which features to keep
features_config = {
    'label_features': ['feature_1', 'feature_3']
}

ARGS = {
    'features': features,
    'features_config': features_config,
}
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 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
multi_label_predictions_binarizer Ran
ran on a synthesized input
13520505/bigdataproj/acr_module/acr/acr_model.py
code served (permissive licence) · get_code("fb6fb4299c1dd4b0")
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 EagerTensor, ndim 2, 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 tensorflow as tf
import numpy as np

# Create a small batch of predictions (logits)
# Shape: (batch_size=2, num_labels=4)
predictions = tf.constant([
    [-1.5, 0.2, 1.8, -0.5],
    [0.3, -0.8, 1.2, 2.1]
], dtype=tf.float32)

ARGS = {
    "predictions": predictions,
    "threshold": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family int — no output shape is stated: observe_signature.py recorded SymbolicTensor ndim 2, 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
split_string Ran
ran on a synthesized input
13520505/bigdataproj/acr_module/acr/acr_module_service.py
code served (permissive licence) · get_code("a899dd1432227118")
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

torch.manual_seed(0)

# The function split_string takes a string parameter and splits it by '/'
# then returns the last element. We need to provide a string argument.

string_arg = "path/to/some/file.txt"

ARGS = {
    "string": string_arg
}
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
state_tuples_to_cudnn_lstm_state Ran
ran on a synthesized input
13520505/bigdataproj/acr_module/acr/acr_model.py
code served (permissive licence) · get_code("a7b6c0af976540cf")
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 4, 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 tensorflow as tf

# Create a simple stand-in class for LSTMStateTuple
class LSTMStateTuple:
    def __init__(self, c, h):
        self.c = c
        self.h = h

# Create sample LSTM state tuples
# Each tuple has c (cell state) and h (hidden state)
state_tuple_1 = LSTMStateTuple(
    c=tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32),
    h=tf.constant([[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8]], dtype=tf.float32)
)

state_tuple_2 = LSTMStateTuple(
    c=tf.constant([[9.0, 10.0, 11.0, 12.0], [13.0, 14.0, 15.0, 16.0]], dtype=tf.float32),
    h=tf.constant([[0.9, 1.0, 1.1, 1.2], [1.3, 1.4, 1.5, 1.6]], dtype=tf.float32)
)

lstm_state_tuples = [state_tuple_1, state_tuple_2]

ARGS = {
    "lstm_state_tuples": lstm_state_tuples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, 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
cudnn_lstm_state_to_state_tuples Not yet run
unverified (harvested, no recorded run)
13520505/bigdataproj/acr_module/acr/acr_model.py
code served (permissive licence) · get_code("c96bff04da606cd4")
How it ran

no invocation recorded.

get_session_features_config Not yet run
unverified (harvested, no recorded run)
13520505/bigdataproj/acr_module/acr/acr_trainer_adressa.py
code served (permissive licence) · get_code("3c1e1b7e7232dd40")
How it ran

no invocation recorded.

get_session_features_config Not yet run
unverified (harvested, no recorded run)
13520505/bigdataproj/acr_module/acr/acr_trainer_cafebiz.py
code served (permissive licence) · get_code("7605cbd30da2f8cf")
How it ran

no invocation recorded.

load_acr_preprocessing_assets Not yet run
unverified (harvested, no recorded run)
13520505/bigdataproj/acr_module/acr/acr_trainer_adressa.py
code served (permissive licence) · get_code("b91e693b60dd39d0")
How it ran

no invocation recorded.

parse_sequence_example Not yet run
unverified (harvested, no recorded run)
13520505/bigdataproj/acr_module/acr/acr_datasets.py
code served (permissive licence) · get_code("f52257f03c634416")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 9 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 9 later) and 4 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
create_multihot_feature 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems
cudnn_lstm_state_to_state_tuples 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems
deflate_and_split_features_label 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems
get_label_features 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems
get_session_features_config 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems
load_acr_preprocessing_assets 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems
multi_label_predictions_binarizer 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems
parse_sequence_example 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems
state_tuples_to_cudnn_lstm_state 1 other paper
1 later
1907.07629 (2019-07)
On the Importance of News Content Representation in Hybrid Neural Session-based Recommender Systems

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 help users deal with information overload by providing tailored item suggestions to them. The recommendation of news is often considered to be challenging, since the relevance of an article for a user can depend on a variety of factors, including the user's short-term reading interests, the reader's context, or the recency or popularity of an article. Previous work has shown that the use of Recurrent Neural Networks is promising for the next-in-session prediction task, but has certain limitations when only recorded item click sequences are used as input. In this work, we present a contextual hybrid, deep learning based approach for session-based news recommendation that is able to leverage a variety of information types. We evaluated our approach on two public datasets, using a temporal evaluation protocol that simulates the dynamics of a news portal in a realistic way. Our results confirm the benefits of considering additional types of information, including article popularity and recency, in the proposed way, resulting in significantly higher recommendation accuracy and catalog coverage than other session-based algorithms. Additional experiments show that the proposed parameterizable loss function used in our method also allows us to balance two usually conflicting quality factors, accuracy and novelty. Keywords: Artificial Neural Networks, Context-Aware Recommender Systems, Hybrid Recommender Systems, News Recommender Systems, Session-based Recommendation

For agents

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

get_harvested_code_for_paper("1904.10367")
get_code_for_paper("1904.10367")
have("1904.10367")

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

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

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

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

Connect an agent — have() is free.