SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1905.06482 · 2019

Deep Session Interest Network for Click-Through Rate Prediction

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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 5 have no contract verdict; 0 failures of our instrument; 4 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/1905.06482.json · badge: /api/ran/1905.06482.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
shenweichen/DSIN canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
shenweichen/DeepCTR-PyTorch community (classifier label)
classifier basis not recorded on the link
4 ran · 3 no recorded run
FunctionStatusWhere it lives
activation_layer Ran
ran on a synthesized input
shenweichen/DeepCTR-PyTorch/deepctr_torch/layers/activation.py
code served (permissive licence) · get_code("e8b1b2ea4e2ca71d")
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 Sigmoid. 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)

ARGS = {
    'act_name': 'sigmoid',
    'hidden_size': 8,
    'dice_dim': 2,
}
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 Sigmoid — a Sigmoid output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sigmoid 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
applyParallel Ran
ran on a synthesized input
shenweichen/DSIN/code/1_gen_sessions.py
code served (permissive licence) · get_code("e911ade27bc9a1e1")
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 pandas as pd
import numpy as np
from joblib import Parallel, delayed

# Create a simple test function that operates on grouped data
def test_func(name, group):
    """Simple function that processes a group and returns a result"""
    return (name, len(group))

# Create sample grouped data using pandas
data = {
    'group': ['A', 'A', 'B', 'B', 'C'],
    'value': [1, 2, 3, 4, 5]
}
df = pd.DataFrame(data)
df_grouped = df.groupby('group')

ARGS = {
    'df_grouped': df_grouped,
    'func': test_func,
    'n_jobs': 2,
    'backend': 'loky'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
joblib, numpy, pandas — 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
concat_fun Ran
ran, honoured the contract we drafted
shenweichen/DeepCTR-PyTorch/deepctr_torch/layers/utils.py
code served (permissive licence) · get_code("1fe3b872ad1577a2")
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 2, dtype family float, shape (2, 8) 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 small distinct-sized tensors for testing
tensor1 = torch.randn(2, 3)
tensor2 = torch.randn(2, 5)

ARGS = {
    "inputs": [tensor1, tensor2],
    "axis": -1
}
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 2, dtype family float, shape (2, 8) — shape (2, 8) 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
create_linear Ran
ran on a synthesized input
shenweichen/DeepCTR-PyTorch/deepctr_torch/layers/core.py
code served (permissive licence) · get_code("0587370e9dce83e6")
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 Linear. 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)

ARGS = {
    'in_features': 4,
    'out_features': 3,
    'bias': True,
    'initializer': 'glorot_uniform',
    'device': 'cpu'
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
gen_session_list_din Ran
ran on a synthesized input
shenweichen/DSIN/code/1_gen_sessions.py
code served (permissive licence) · get_code("9b2ac03f6d109fc5")
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 torch

# Create a small DataFrame that mimics the structure expected by gen_session_list_din
# The function expects a dataframe with columns: 'time_stamp', 'cate', 'brand'
data = {
    'time_stamp': [100, 105, 110, 115],
    'cate': [1, 2, 3, 4],
    'brand': [10, 20, 30, 40]
}
t = pd.DataFrame(data)

uid = 'user_123'

ARGS = {
    'uid': uid,
    't': t
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch — 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
gen_session_list_dsin Ran
ran on a synthesized input
shenweichen/DSIN/code/1_gen_sessions.py
code served (permissive licence) · get_code("6394c5a1c5f90011")
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 numpy as np

# Create a small DataFrame with the required columns
data = {
    'time_stamp': [1483574401, 1483574500, 1483574600, 1483575000, 1483575100, 1483575200],
    'cate': [1, 2, 3, 1, 2, 3],
    'brand': [10, 20, 30, 10, 20, 30]
}
df = pd.DataFrame(data)

uid = 'user_123'
t = df

ARGS = {
    'uid': uid,
    't': t
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
slice_arrays Ran
ran, violated the contract we drafted
shenweichen/DeepCTR-PyTorch/deepctr_torch/layers/utils.py
code served (permissive licence) · get_code("af0fde726ec3b518")
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 3, 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 numpy as np

# Test case 1: Single numpy array with integer slicing
arrays_1 = np.arange(10).reshape(5, 2)
start_1 = 1
stop_1 = 4

# Test case 2: List of numpy arrays with integer slicing
arrays_2 = [np.arange(12).reshape(3, 4), np.arange(12, 24).reshape(3, 4)]
start_2 = 0
stop_2 = 2

# Test case 3: List of arrays with index array
arrays_3 = [np.arange(20).reshape(5, 4), np.arange(20, 40).reshape(5, 4)]
start_3 = np.array([0, 2, 4])
stop_3 = None

# Test case 4: Single array with index list
arrays_4 = np.arange(15).reshape(5, 3)
start_4 = [1, 3]
stop_4 = None

# Test case 5: None arrays
arrays_5 = None
start_5 = None
stop_5 = None

ARGS = {
    "arrays": arrays_2,
    "start": start_2,
    "stop": stop_2
}
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 list, ndim 3, dtype family int — 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
build_input_features Not yet run
unverified (harvested, no recorded run)
shenweichen/DeepCTR-PyTorch/deepctr_torch/inputs.py
code served (permissive licence) · get_code("2fb349ac030ba393")
How it ran

no invocation recorded.

combined_dnn_input Not yet run
unverified (harvested, no recorded run)
shenweichen/DeepCTR-PyTorch/deepctr_torch/inputs.py
code served (permissive licence) · get_code("2aea84481b6e2f65")
How it ran

no invocation recorded.

get_feature_names Not yet run
unverified (harvested, no recorded run)
shenweichen/DeepCTR-PyTorch/deepctr_torch/inputs.py
code served (permissive licence) · get_code("ba1c9d87dd13207a")
How it ran

no invocation recorded.

sample Not yet run
unverified (harvested, no recorded run)
shenweichen/DSIN/code/2_gen_dien_input.py
code served (permissive licence) · get_code("b56571d4383066f9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 7 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
get_feature_names 4 other papers
1 dated earlier, 3 later
1703.04247 (2017-03)
DeepFM: A Factorization-Machine based Neural Network for CTR Prediction
2008.13535 (2020-08)
DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems
2212.02779 (2022-12)
PrefRec: Recommender Systems with Human Preferences for Reinforcing Long-term User Engagement
and 1 more not named here
build_input_features 3 other papers
1 dated earlier, 2 later
1703.04247 (2017-03)
DeepFM: A Factorization-Machine based Neural Network for CTR Prediction
2008.13535 (2020-08)
DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems
2212.02779 (2022-12)
PrefRec: Recommender Systems with Human Preferences for Reinforcing Long-term User Engagement
combined_dnn_input 2 other papers
2 later
2008.13535 (2020-08)
DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems
2212.02779 (2022-12)
PrefRec: Recommender Systems with Human Preferences for Reinforcing Long-term User Engagement
concat_fun 2 other papers
2 later
2008.13535 (2020-08)
DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems
2311.06190 (2023-11)
FourierGNN: Rethinking Multivariate Time Series Forecasting from a Pure Graph Perspective
slice_arrays 2 other papers
2 later
2008.13535 (2020-08)
DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems
2311.06190 (2023-11)
FourierGNN: Rethinking Multivariate Time Series Forecasting from a Pure Graph Perspective
activation_layer 1 other paper
1 later
2008.13535 (2020-08)
DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems
create_linear 1 other paper
1 later
2008.13535 (2020-08)
DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank 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-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

Click-Through Rate (CTR) prediction plays an important role in many industrial applications, such as online advertising and recommender systems. How to capture users' dynamic and evolving interests from their behavior sequences remains a continuous research topic in the CTR prediction. However, most existing studies overlook the intrinsic structure of the sequences: the sequences are composed of sessions, where sessions are user behaviors separated by their occurring time. We observe that user behaviors are highly homogeneous in each session, and heterogeneous cross sessions. Based on this observation, we propose a novel CTR model named Deep Session Interest Network (DSIN) that leverages users' multiple historical sessions in their behavior sequences. We first use self-attention mechanism with bias encoding to extract users' interests in each session. Then we apply Bi-LSTM to model how users' interests evolve and interact among sessions. Finally, we employ the local activation unit to adaptively learn the influences of various session interests on the target item. Experiments are conducted on both advertising and production recommender datasets and DSIN outperforms other state-of-the-art models on both datasets.

For agents

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

get_harvested_code_for_paper("1905.06482")
get_code_for_paper("1905.06482")
have("1905.06482")

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

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

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

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

Connect an agent — have() is free.