SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_16593 · AAAI · 2021

Dual Sparse Attention Network For Session-based Recommendation

Wayne Zhao, Xiaoling Wang, Jiahao Yuan, Zihan Song, Mingyou Sun

Code that ran

13 of 18 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 12 have no contract verdict; 1 failure of our instrument; 5 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/aaai_16593.json · badge: /api/ran/aaai_16593.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
SamHaoYuan/DSANForAAAI2021 canonical (classifier label)
classifier basis: census
13 ran · 5 no recorded run
FunctionStatusWhere it lives
bpr_loss Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/baselines/Bert4Rec.py
code served (permissive licence) · get_code("1a20ea1f72a94658")
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

torch.manual_seed(0)

# The function expects a tensor 'r' and computes BPR loss
# BPR loss: sum of -log(sigmoid(r))
# r should be a tensor of ratings/scores

r = torch.randn(2, 4)

ARGS = {
    'r': r
}
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 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
cal_similarity Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/baselines/CoSAN/dataloader.py
code served (permissive licence) · get_code("77328d97c857a533")
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 float, 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 math

# Based on the function signature and body:
# - s: current session (used as s[:t+1], converted to set) - should be a list/sequence
# - m: candidate neighbourhood session (converted to set) - should be a list/sequence
# - t: timestamp (used as index t+1) - should be an integer

# Create sample sessions as lists of items
current_session = [1, 2, 3, 4, 5]  # list of item IDs
neighbourhood_session = [2, 3, 5, 6, 7]  # list of item IDs
timestamp = 2  # index within the session

ARGS = {
    "s": current_session,
    "m": neighbourhood_session,
    "t": timestamp
}
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 float, 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
get_hit_num Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/baselines/Bert4Rec.py
code served (permissive licence) · get_code("342cf81781d42e1f")
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 int64, ndim 0, dtype family int, 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 numpy as np

# pred: numpy array of shape (batch_size, k) containing predicted values
# y_truth: list of length batch_size, where each element is a list of ground truth values

# Create small example data
batch_size = 2
k = 4

# pred: numpy array of predictions
pred = np.array([
    [1, 2, 3, 4],
    [5, 6, 7, 8]
], dtype=np.int32)

# y_truth: list of lists containing ground truth values
y_truth = [
    [1, 3],      # ground truth for first sample
    [6, 8, 9]    # ground truth for second sample
]

ARGS = {
    "pred": pred,
    "y_truth": y_truth
}
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 int64, ndim 0, dtype family int, 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
get_hit_num Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/baselines/STAMP.py
code served (permissive licence) · get_code("f2276e21b7a77185")
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 int64, ndim 0, dtype family int, 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 numpy as np

# Construct arguments for get_hit_num
# pred: numpy array of shape (batch_size, k) containing predicted item indices
# y_truth: list of batch_size elements, each containing a list of ground truth item indices

batch_size = 2
k = 4

# Create pred as a numpy array of shape (batch_size, k)
# These represent predicted item indices
pred = np.array([
    [0, 1, 2, 3],
    [5, 6, 7, 8]
], dtype=np.int64)

# Create y_truth as a list of lists
# Each inner list contains ground truth item indices for that batch element
y_truth = [
    [1, 3],      # batch 0: ground truth items are 1 and 3
    [5, 9]       # batch 1: ground truth items are 5 and 9
]

ARGS = {
    "pred": pred,
    "y_truth": y_truth
}
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 int64, ndim 0, dtype family int, 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
get_mrr Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/metric.py
code served (permissive licence) · get_code("b2855aa20847e693")
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

torch.manual_seed(0)

# Create sample tensors for the function
# pre: (B, K) TOP-K indices predicted by the model
# B=2 (batch size), K=4 (top-k predictions)
pre = torch.tensor([[0, 1, 2, 3],
                    [1, 0, 3, 2]], dtype=torch.long)

# truth: (B, 1) real label
# B=2 (batch size), 1 (single true label per sample)
truth = torch.tensor([[1],
                      [0]], dtype=torch.long)

ARGS = {
    "pre": pre,
    "truth": truth
}
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 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
get_recall Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/metric.py
code served (permissive licence) · get_code("e755a49d3d3be4ed")
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 float, 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

torch.manual_seed(0)

# pre: (B, K) TOP-K indices predicted by the model
# truth: (B, 1) the truth value of test samples
# The function expands truth to match pre's shape, then compares them element-wise

B = 2  # batch size
K = 4  # top-K predictions

# Create pre tensor: (B, K) with predicted indices
pre = torch.tensor([[1, 2, 3, 4], 
                    [5, 6, 7, 8]], dtype=torch.long)

# Create truth tensor: (B, 1) with ground truth value
# Make it so at least one match exists to test the nonzero path
truth = torch.tensor([[2], 
                      [6]], dtype=torch.long)

ARGS = {
    "pre": pre,
    "truth": truth
}
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 float, 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
get_rr Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/baselines/Bert4Rec.py
code served (permissive licence) · get_code("a142e2eba3bd9ad4")
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 float64, ndim 0, 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 numpy as np

# Based on the function, it expects:
# - pred: array-like indexed by i, where pred[i] can be indexed and compared with ==
# - y_truth: array-like indexed by i, where y_truth[i] is iterable
# The function uses np.where to find matching indices

# Create small test data
pred = [
    np.array([1, 2, 3, 4]),
    np.array([5, 6, 7, 8])
]

y_truth = [
    np.array([2, 4]),
    np.array([6, 8])
]

ARGS = {
    "pred": pred,
    "y_truth": y_truth
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, 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
get_rr Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/baselines/STAMP.py
code served (permissive licence) · get_code("1f7a53e3bad32e5d")
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 float64, ndim 0, 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 numpy as np

# Build arguments for get_rr function
# pred: numpy array of shape (batch_size, k) containing predicted item indices
# y_truth: list of lists where each inner list contains ground truth item indices

batch_size = 2
k = 4

# Create pred as a numpy array (batch_size, k) with item indices
# Using small integers to represent item IDs
pred = np.array([
    [0, 1, 2, 3],
    [2, 1, 0, 3]
], dtype=np.int32)

# Create y_truth as a list of lists
# Each inner list contains ground truth items that should be ranked
y_truth = [
    [1, 3],      # For batch sample 0: items 1 and 3 are relevant
    [0, 2]       # For batch sample 1: items 0 and 2 are relevant
]

ARGS = {
    "pred": pred,
    "y_truth": y_truth
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, 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
load_data Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/Preprocess_rr.py
code served (permissive licence) · get_code("953355c4d70832f9")
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
import pandas as pd
from datetime import datetime, timezone, timedelta
import tempfile
import os

# Create a temporary CSV file with sample data
temp_dir = tempfile.gettempdir()
temp_file = os.path.join(temp_dir, 'test_data')

# Generate sample event data
np.random.seed(0)
n_events = 100
timestamps = np.sort(np.random.randint(1000000000, 1000001000, n_events)) * 1000  # in milliseconds
user_ids = np.random.randint(1, 10, n_events).astype(np.int32)
types = np.random.choice(['view', 'addtocart'], n_events)
item_ids = np.random.randint(1, 50, n_events).astype(np.int32)

# Create DataFrame and save to CSV
df = pd.DataFrame({
    'Time': timestamps,
    'UserId': user_ids,
    'Type': types,
    'ItemId': item_ids
})

df.to_csv(temp_file + '.csv', sep=',', header=True, index=False)

ARGS = {
    'file': temp_file
}
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
split_seq Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/Preprocess_dn.py
code served (permissive licence) · get_code("6936bc91d18e6793")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function split_seq:
# - sid: iterable of sequence IDs
# - timestamp: iterable of timestamps
# - seq: iterable of sequences (each seq is indexable and has len())
# The function zips these three parameters together
# For each item, it accesses seq with negative indexing (seq[-i], seq[:-i])
# and appends to lists

# Create small test data
sid_list = [101, 102]
timestamp_list = [1000, 2000]
seq_list = [
    [10, 20, 30, 40],  # sequence of length 4
    [50, 60, 70]       # sequence of length 3
]

ARGS = {
    "sid": sid_list,
    "timestamp": timestamp_list,
    "seq": seq_list
}
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 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
split_seq_train Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/Preprocess_dn.py
code served (permissive licence) · get_code("44911786311a1fac")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - sid: iterable of sequence IDs, used in zip and appended to list
# - timestamp: iterable of timestamps, used in zip and appended to list
# - seq: iterable of sequences, used in zip, len() is called, indexing with [:-i], appended to list

# Create small test data
sid_list = [1, 2]
timestamp_list = [100, 200]
seq_list = [
    [10, 20, 30, 40],  # length 4, > filter_len (2)
    [5, 6, 7]           # length 3, > filter_len (2)
]

ARGS = {
    "sid": sid_list,
    "timestamp": timestamp_list,
    "seq": seq_list
}
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 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
split_validation Ran
ran; our contract draft was wrong, not the code
SamHaoYuan/DSANForAAAI2021/baselines/GCSAN.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from zhang-xiaokun/finerec, is pointer only (licence: NONE) · get_code("ab41533f85ff63ce")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from zhang-xiaokun/finerec, 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.

trans_to_cuda Ran
ran on a synthesized input
SamHaoYuan/DSANForAAAI2021/baselines/GCSAN.py
code served (permissive licence) · get_code("639ac0a39ed79936")
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, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 as nn

torch.manual_seed(0)

# The function takes a 'variable' parameter and calls .to(device) on it
# We need to pass a tensor since that's what .to() is commonly called on

# Create a small tensor
variable = torch.randn(2, 4)

ARGS = {
    "variable": variable
}
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, 4) — shape (2, 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
bpr_loss Not yet run
unverified (harvested, no recorded run)
SamHaoYuan/DSANForAAAI2021/baselines/pop.py
code served (permissive licence) · get_code("2abc18fa0a079e3b")
How it ran

no invocation recorded.

data_masks Not yet run
unverified (harvested, no recorded run)
SamHaoYuan/DSANForAAAI2021/baselines/GCSAN.py
code served (permissive licence) · get_code("d00d2724457e5fc9")
How it ran

no invocation recorded.

filter_data Not yet run
unverified (harvested, no recorded run)
SamHaoYuan/DSANForAAAI2021/Preprocess_rr.py
code served (permissive licence) · get_code("8f069fd78fbb0b80")
How it ran

no invocation recorded.

filter_min_date Not yet run
unverified (harvested, no recorded run)
SamHaoYuan/DSANForAAAI2021/Preprocess_rr.py
code served (permissive licence) · get_code("3083e688fe881359")
How it ran

no invocation recorded.

find_neighbors Not yet run
unverified (harvested, no recorded run)
SamHaoYuan/DSANForAAAI2021/baselines/CoSAN/dataloader.py
code served (permissive licence) · get_code("a02d091224a46937")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 15 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, 1 later) and 13 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
split_validation 2 other papers
1 dated earlier, 1 later
2005.02844 (2020-05)
TAGNN: Target Attentive Graph Neural Networks for Session-based Recommendation
2404.12975 (2024-04)
FineRec:Exploring Fine-grained Sequential Recommendation
data_masks 1 other paper
1 dated earlier
2005.02844 (2020-05)
TAGNN: Target Attentive Graph Neural Networks for Session-based Recommendation

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

Session-based Recommendations recommend the next possible item for the user with anonymous sessions, whose challenge is that the user's behavioral preference can only be analyzed in a limited sequence to meet their need. Recent advances evaluate the effectiveness of the attention mechanism in the session-based recommendation. However, two simplifying assumptions are made by most of these attentionbased models. One is to regard the last-click as the query vector to denote the user's current preference, and the other is to consider that all items within the session are favorable for the final result, including the effect of unrelated items (i.e., spurious user behaviors). In this paper, we propose a novel Dual Sparse Attention Network for the sessionbased recommendation called DSAN to address these shortcomings. In this proposed method, we explore a learned target item embedding to model the user's current preference and apply an adaptively sparse transformation function to eliminate the effect of the unrelated items. Experimental results on two real public datasets show that the proposed method is superior to the state-of-the-art sessionbased recommendation algorithm in all tests and also demonstrate that not all actions within the session are useful. To make our results reproducible, we have published our code on https://github.com/SamHaoYuan/DSANForAAAI2021.

For agents

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

get_harvested_code_for_paper("aaai_16593")
get_code_for_paper("aaai_16593")
have("aaai_16593")

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

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

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

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

Connect an agent — have() is free.