SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2208.00108 · 2022

Some Practice for Improving the Search Results of E-commerce

arXiv · PDF · Open in the Atlas

Code that ran

10 of 14 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 9 have no contract verdict; 1 failure 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/2208.00108.json · badge: /api/ran/2208.00108.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
wufanyou/kdd-cup-2022-amazon canonical (classifier label)
classifier basis not recorded on the link
10 ran · 4 no recorded run
FunctionStatusWhere it lives
TFDebertaV2XDropout Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/deberta/modeling_tf_deberta_v2.py
code served (permissive licence) · get_code("0a90b2877ae25c0f")
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 float, shape (2, 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create a small input tensor (batch_size=2, feature_dim=4)
input_tensor = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# Create a dropout rate
dropout_rate = 0.5

ARGS = {
    "input": input_tensor,
    "local_ctx": dropout_rate
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow, transformers — 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 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
build_relative_position Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/deberta/modeling_deberta_v2.py
code served (permissive licence) · get_code("8e6ba34e4d97fe65")
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 3, dtype family int, shape (1, 4, 6) 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)

ARGS = {
    "query_size": 4,
    "key_size": 6,
    "bucket_size": 8,
    "max_position": 128,
}
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 3, dtype family int, shape (1, 4, 6) — shape (1, 4, 6) 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_filename Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/config.py
code served (permissive licence) · get_code("d96fa26146c30523")
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

ARGS = {
    "path": "path/to/my/file.txt"
}
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 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
get_loss Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/loss.py
code served (permissive licence) · get_code("0ab4675f5f517d61")
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 CrossEntropyLoss. 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
from omegaconf import DictConfig

torch.manual_seed(0)

# Create a minimal loss function class that can be eval'd
class CrossEntropyLoss(nn.Module):
    def __init__(self, reduction='mean'):
        super().__init__()
        self.reduction = reduction
    
    def forward(self, input, target):
        return nn.functional.cross_entropy(input, target, reduction=self.reduction)

# Create config with loss specification
cfg = DictConfig({
    'loss': {
        'version': 'CrossEntropyLoss',
        'args': {
            'reduction': 'mean'
        }
    }
})

# Make CrossEntropyLoss available in the eval scope
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'CrossEntropyLoss', CrossEntropyLoss)

ARGS = {
    'cfg': cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CrossEntropyLoss — a CrossEntropyLoss output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CrossEntropyLoss 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
get_mask Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/deberta/modeling_tf_deberta_v2.py
code served (permissive licence) · get_code("7d62afafbe790dd4")
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 tensorflow as tf
from transformers.tf_utils import shape_list, stable_softmax

# Create a small TensorFlow tensor as input
# The function uses shape_list(input) to get dimensions
# and samples from a Bernoulli distribution with that shape
input_tensor = tf.constant([[1.0, 2.0, 3.0, 4.0],
                             [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

dropout_rate = 0.5

ARGS = {
    'input': input_tensor,
    'dropout': dropout_rate
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow, transformers — 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
get_metric Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/metric.py
code served (permissive licence) · get_code("0fb0c7261afe47ce")
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 SimpleMetric. 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
from omegaconf import DictConfig
from omegaconf import OmegaConf

torch.manual_seed(0)

# Create a simple metric class that can be instantiated
class SimpleMetric(nn.Module):
    def __init__(self, threshold=0.5, reduction='mean'):
        super().__init__()
        self.threshold = threshold
        self.reduction = reduction
    
    def forward(self, x):
        return x.mean()

# Create the config with the required structure
cfg_dict = {
    'metric': {
        'version': 'SimpleMetric',
        'args': {
            'threshold': 0.5,
            'reduction': 'mean'
        }
    }
}

cfg = OmegaConf.create(cfg_dict)

# Make SimpleMetric available in the eval scope
import sys
import types
module = types.ModuleType('__main__')
module.SimpleMetric = SimpleMetric
sys.modules['__main__'] = module

# Inject SimpleMetric into builtins for eval to find it
import builtins
builtins.SimpleMetric = SimpleMetric

ARGS = {
    'cfg': cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleMetric — a SimpleMetric output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleMetric 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
get_saver Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/experiment.py
code served (permissive licence) · get_code("64f54b18171bf8a4")
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 ModelCheckpoint. 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
from omegaconf import DictConfig, OmegaConf
from pytorch_lightning.callbacks import ModelCheckpoint

torch.manual_seed(0)

cfg_dict = {
    'experiment': {
        'name': 'test_exp',
        'saver': {
            'filename': '{experiment}_checkpoint',
            'monitor': 'val_loss',
            'mode': 'min',
            'save_top_k': 3,
            'verbose': True,
        }
    },
    'disk': {
        'model_dir': '/tmp/models'
    },
    'train_all': False
}

cfg = OmegaConf.create(cfg_dict)

ARGS = {
    'cfg': cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf, pytorch_lightning, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ModelCheckpoint — a ModelCheckpoint output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModelCheckpoint 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
make_log_bucket_position Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/deberta/modeling_deberta_v2.py
code served (permissive licence) · get_code("35977baa15732f06")
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 int, shape (6,) 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)

# Construct arguments for make_log_bucket_position
# The function takes:
# - relative_pos: a tensor of relative positions
# - bucket_size: an integer for bucket size
# - max_position: an integer for maximum position

# Create a small tensor of relative positions
relative_pos = torch.tensor([-5, -2, 0, 3, 8, 15], dtype=torch.long)

# Set bucket_size to a reasonable value
bucket_size = 8

# Set max_position to a reasonable value
max_position = 128

ARGS = {
    "relative_pos": relative_pos,
    "bucket_size": bucket_size,
    "max_position": max_position,
}
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 int, shape (6,) — shape (6,) 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
make_log_bucket_position Ran
ran on a synthesized input
wufanyou/kdd-cup-2022-amazon/utils/deberta/modeling_tf_deberta_v2.py
code served (permissive licence) · get_code("e8fb1128415255ce")
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, shape (2, 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 tensorflow as tf

# Create small example tensors for the function parameters
relative_pos = tf.constant([[-5, -2, 0, 3], [8, -10, 1, -1]], dtype=tf.int32)
bucket_size = 8
max_position = 128

ARGS = {
    "relative_pos": relative_pos,
    "bucket_size": bucket_size,
    "max_position": max_position,
}
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 EagerTensor, ndim 2, dtype family int, 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
relative_position_bucket Ran
ran; our contract draft was wrong, not the code
wufanyou/kdd-cup-2022-amazon/utils/cocolm/modeling_cocolm.py
code served (permissive licence) · get_code("56a2f49e4e3b9f21")
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 int, shape (2, 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
import math

torch.manual_seed(0)

# Create a small tensor for relative_position
# The function expects a tensor of relative positions (can be any shape)
relative_position = torch.tensor([[-5, -2, 0, 3], [8, 15, 50, 120]], dtype=torch.long)

# Standard parameters for the function
num_buckets = 32
max_distance = 128

ARGS = {
    "relative_position": relative_position,
    "num_buckets": num_buckets,
    "max_distance": max_distance,
}
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 int, 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
get_cfg Not yet run
unverified (harvested, no recorded run)
wufanyou/kdd-cup-2022-amazon/utils/config.py
code served (permissive licence) · get_code("280a4a6faee6ea3a")
How it ran

no invocation recorded.

get_dataloader Not yet run
unverified (harvested, no recorded run)
wufanyou/kdd-cup-2022-amazon/utils/dataloader.py
code served (permissive licence) · get_code("54edf81974eded0d")
How it ran

no invocation recorded.

get_lighting Not yet run
unverified (harvested, no recorded run)
wufanyou/kdd-cup-2022-amazon/utils/lighting.py
code served (permissive licence) · get_code("7cf5da9143557f16")
How it ran

no invocation recorded.

get_mask Not yet run
unverified (harvested, no recorded run)
wufanyou/kdd-cup-2022-amazon/utils/deberta/modeling_deberta_v2.py
pointer only (licence: MIT); the stored copy get_code serves, from Kowsher/Propulsion, is pointer only (licence: NONE) · get_code("11c7e96cb235d1f7")
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 Kowsher/Propulsion, 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. No invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 12 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_mask 4 other papers
4 later
2311.08355 (2023-11)
Mustango: Toward Controllable Text-to-Music Generation
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation
2406.15487 (2024-06)
Improving Text-To-Audio Models with Synthetic Captions
and 1 more not named here
relative_position_bucket 2 other papers
1 dated earlier, 1 later
2204.03243 (2022-04)
Pretraining Text Encoders with Adversarial Mixture of Training Signal Generators
2406.12527 (2024-06)
FuseGen: PLM Fusion for Data-generation based Zero-shot Learning

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

In the Amazon KDD Cup 2022, we aim to apply natural language processing methods to improve the quality of search results that can significantly enhance user experience and engagement with search engines for e-commerce. We discuss our practical solution for this competition, ranking 6th in task one, 2nd in task two, and 2nd in task 3. The code is available at https://github.com/wufanyou/KDD-Cup-2022-Amazon.

For agents

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

get_harvested_code_for_paper("2208.00108")
get_code_for_paper("2208.00108")
have("2208.00108")

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

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

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

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

Connect an agent — have() is free.