SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2023.findings-emnlp.957 · EMNLP Findings · 2023

An Empirical Investigation of Implicit and Explicit Knowledge-Enhanced Methods for Ad Hoc Dataset Retrieval

Zhiyang Zhang, Qiaosheng Chen, Zixian Huang, Gong Cheng, Weiqing Luo

Open in the Atlas

Code that ran

8 of 10 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, 0 violated it and 6 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-24; 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/2023.findings-emnlp.957.json · badge: /api/ran/2023.findings-emnlp.957.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
nju-websoft/AHDR-KnowledgeEnhanced canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
format_mapping Ran
ran on a synthesized input
nju-websoft/AHDR-KnowledgeEnhanced/src/explicit/configs.py
code served (permissive licence) · get_code("974cb9292d8868d1")
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

torch.manual_seed(0)

ARGS = {
    "format": "test_format_string"
}
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_free_port Ran
ran on a synthesized input
nju-websoft/AHDR-KnowledgeEnhanced/src/explicit/entity_link_bak.py
code served (permissive licence) · get_code("8d38b090bfb003f2")
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 int, 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 multiprocessing

port_lock = multiprocessing.Lock()

def get_free_port(free_ports):
    port = None
    with port_lock:
        if len(free_ports) > 0:
            port = free_ports.pop()
    return port

# Setup code
free_ports_list = [8080, 8081, 8082, 9000]

ARGS = {
    "free_ports": free_ports_list
}
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 int, 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_max_ind Ran
ran on a synthesized input
nju-websoft/AHDR-KnowledgeEnhanced/src/explicit/util.py
code served (permissive licence) · get_code("9bd77f18a859b072")
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 int, 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 os
import tempfile
import shutil

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

# Add some files with digit names and some without
os.makedirs(os.path.join(temp_dir, "0"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "5"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "42"), exist_ok=True)
open(os.path.join(temp_dir, "readme.txt"), "w").close()
open(os.path.join(temp_dir, "config.json"), "w").close()

ARGS = {
    "dir_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 int, 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
interpolate2res Ran
ran on a synthesized input
nju-websoft/AHDR-KnowledgeEnhanced/src/interpolation/interpolate_score.py
code served (permissive licence) · get_code("961178c9a5ef3796")
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

# Construct valid arguments for interpolate2res function
# res1 and res2 are dicts mapping query IDs to lists of (document_id, score) tuples

res1 = {
    'q1': [('d1', 0.9), ('d2', 0.7), ('d3', 0.5), ('d4', 0.3), ('d5', 0.2), 
           ('d6', 0.15), ('d7', 0.1), ('d8', 0.08), ('d9', 0.05), ('d10', 0.02)],
    'q2': [('d11', 0.85), ('d12', 0.75), ('d13', 0.6), ('d14', 0.4), ('d15', 0.25),
           ('d16', 0.18), ('d17', 0.12), ('d18', 0.09), ('d19', 0.06), ('d20', 0.03)],
}

res2 = {
    'q1': [('d1', 0.95), ('d2', 0.65), ('d3', 0.55), ('d4', 0.35), ('d5', 0.22),
           ('d6', 0.16), ('d7', 0.11), ('d8', 0.07), ('d9', 0.04), ('d10', 0.01)],
    'q2': [('d11', 0.88), ('d12', 0.72), ('d13', 0.62), ('d14', 0.42), ('d15', 0.28),
           ('d16', 0.17), ('d17', 0.13), ('d18', 0.08), ('d19', 0.05), ('d20', 0.02)],
}

interpolate_weight = 0.6

k = 10

ARGS = {
    'res1': res1,
    'res2': res2,
    'interpolate_weight': interpolate_weight,
    'k': k,
}
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
json_load Ran
ran on a synthesized input
nju-websoft/AHDR-KnowledgeEnhanced/src/explicit/util.py
code served (permissive licence) · get_code("5581663fbeb0143f")
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 json
import os
import tempfile

# Create a temporary JSON file with valid content
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.json")

test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "object"}
}

with open(temp_file, 'w') as f:
    json.dump(test_data, f)

ARGS = {
    "path": temp_file
}
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 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
load_passages Ran
ran; our contract draft was wrong, not the code
nju-websoft/AHDR-KnowledgeEnhanced/src/implicit/co-Condenser/dense_retriever.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from luyug/GC-DPR, is pointer only (licence: NOASSERTION) · get_code("3e65fdbefb42a546")
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 luyug/GC-DPR, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

no_op_collate Ran
ran, honoured the contract we drafted
nju-websoft/AHDR-KnowledgeEnhanced/src/implicit/co-Condenser/generate_dense_embeddings.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from luyug/GC-DPR, is pointer only (licence: NOASSERTION) · get_code("4d5516637b50f1ad")
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 luyug/GC-DPR, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

normalize_one_res Ran
ran on a synthesized input
nju-websoft/AHDR-KnowledgeEnhanced/src/interpolation/interpolate_score.py
code served (permissive licence) · get_code("6613e8a8a0d5d16a")
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 2, 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 torch
import numpy as np

# Analyze the function:
# - did_score_list: a list of tuples (did, score)
# - normalize_way: a string parameter (default 'max-min')
# The function iterates over did_score_list, extracts scores, finds max/min,
# and returns normalized tuples or all 1s if max==min

# Create a simple did_score_list with distinct DIDs and scores
did_score_list = [
    ('doc_1', 0.2),
    ('doc_2', 0.5),
    ('doc_3', 0.8),
]

ARGS = {
    'did_score_list': did_score_list,
    'normalize_way': 'max-min',
}
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 list, ndim 2, 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_candidates Not yet run
unverified (harvested, no recorded run)
nju-websoft/AHDR-KnowledgeEnhanced/src/explicit/util.py
code served (permissive licence) · get_code("e3a24f47813b52a0")
How it ran

no invocation recorded.

get_word_vector Not yet run
unverified (harvested, no recorded run)
nju-websoft/AHDR-KnowledgeEnhanced/src/explicit/retrieve.py
code served (permissive licence) · get_code("1ecb4c7d5f2651bd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 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, 2 later) and 8 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
load_passages 4 other papers
2 dated earlier, 2 later
2101.06983 (2021-01)
Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup
2102.08633 (2021-02)
Open-Retrieval Conversational Machine Reading
2024.findings-acl.708 (2024 (year only))
Analyze, Generate and Refine: Query Expansion with LLMs for Zero-Shot Open-Domain QA
and 1 more not named here
no_op_collate 2 other papers
1 dated earlier, 1 later
2101.06983 (2021-01)
Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup
2403.03516 (2024-03)
Unsupervised Multilingual Dense Retrieval via Generative Pseudo Labeling

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Ad hoc dataset retrieval has become an important way of finding data on the Web, where the underlying problem is how to measure the relevance of a dataset to a query. State-ofthe-art solutions for this task are still lexical methods, which cannot capture semantic similarity. Semantics-aware knowledge-enhanced retrieval methods, which achieved promising results on other tasks, have yet to be systematically studied on this specialized task. To fill the gap, in this paper, we present an empirical investigation of the task where we implement and evaluate, on two test collections, a set of implicit and explicit knowledge-enhancement retrieval methods in various settings. Our results reveal the unique features of the task and suggest an interpolation of different kinds of methods as the current best practice.

For agents

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

get_harvested_code_for_paper("2023.findings-emnlp.957")
get_code_for_paper("2023.findings-emnlp.957")
have("2023.findings-emnlp.957")

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

curl https://syntology.ai/api/ran/2023.findings-emnlp.957.json

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

[![Syntology run record](https://syntology.ai/api/ran/2023.findings-emnlp.957.svg)](https://syntology.ai/paper/2023.findings-emnlp.957)

Connect an agent — have() is free.