SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.02175 · 2024

Enhancing Complex Question Answering over Knowledge Graphs through Evidence Pattern Retrieval

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2402.02175.json · badge: /api/ran/2402.02175.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/epr-kgqa canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
to_list Ran
ran; our contract draft was wrong, not the code
nju-websoft/epr-kgqa/evidence_pattern_retrieval/BERT_Ranker/model_config.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AI-secure/InfoBERT, is pointer only (licence: NONE) · get_code("9df40357afea56cc")
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 AI-secure/InfoBERT, 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.

get_fact_cnt_4_item Ran
ran, honoured the contract we drafted
nju-websoft/epr-kgqa/evidence_pattern_retrieval/ep_size_threshold.py
code served (permissive licence) · get_code("8376f539fe5a96a1")
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.

# Analyze the function to understand what it needs
# get_fact_cnt_4_item takes 'paths' parameter
# paths is iterated over, each path has:
# - path[0]: an entity (used as dict key)
# - path[1:]: relations (each rel is a string that may contain '...')

# Build valid arguments
ARGS = {
    "paths": [
        ["entity_1", "relation_1", "relation_2"],
        ["entity_1", "relation_3...relation_4", "relation_5"],
        ["entity_2", "relation_6"],
        ["entity_2", "relation_7...relation_8", "relation_9...relation_10"],
    ]
}
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_fact_cnt_4_path Ran
ran, honoured the contract we drafted
nju-websoft/epr-kgqa/evidence_pattern_retrieval/ep_size_threshold.py
code served (permissive licence) · get_code("0510150073faa20c")
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.

# Analyze the function
# get_fact_cnt_4_path takes a parameter 'path'
# It iterates through path[1:] (all elements except the first)
# For each element 'rel', it checks if the string '...' is found in it
# If found, it adds 2 to ans, otherwise adds 1

# So 'path' should be a list where:
# - path[0] is the first element (skipped in iteration)
# - path[1:] contains strings that may or may not contain '...'

ARGS = {
    'path': ['start_node', 'relation1', 'relation2...relation3', 'relation4']
}
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
load_dataset Ran
ran; our contract draft was wrong, not the code
nju-websoft/epr-kgqa/NSM_H/integrate_results.py
code served (permissive licence) · get_code("ee184b87540e9156")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary file with JSONL content
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl', encoding='utf-8')
temp_filename = temp_file.name

# Write sample JSONL data matching the expected format
sample_data = [
    {
        'question': 'What is the capital of France?',
        'entities': ['France', 'Paris'],
        'answers': [{'kb_id': 'Q90'}, {'kb_id': 'Q1234'}]
    },
    {
        'question': 'Who wrote Hamlet?',
        'entities': ['Hamlet', 'Shakespeare'],
        'answers': [{'kb_id': 'Q692'}]
    }
]

for item in sample_data:
    temp_file.write(json.dumps(item) + '\n')

temp_file.close()

ARGS = {
    'filename': temp_filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_dict Ran
ran; our contract draft was wrong, not the code
nju-websoft/epr-kgqa/NSM_H/simplify_dataset.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from cmavro/gnn-rag, is pointer only (licence: NONE) · get_code("df9be8b9ddd85c0a")
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 cmavro/gnn-rag, 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.

load_entity Ran
ran; our contract draft was wrong, not the code
nju-websoft/epr-kgqa/NSM_H/integrate_results.py
code served (permissive licence) · get_code("218ae9cb3f538fe7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with some entity data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, encoding='utf-8', suffix='.txt')
temp_file.write("entity1\n")
temp_file.write("entity2\n")
temp_file.write("entity3\n")
temp_file.close()

filename = temp_file.name

ARGS = {
    "filename": filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simplify_entities Ran
ran, honoured the contract we drafted
nju-websoft/epr-kgqa/NSM_H/simplify_dataset.py
code served (permissive licence) · get_code("aa028d85e1841477")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family 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 torch

# Define a small entity list with entity dictionaries
entity_list = [
    {'text': 'Apple'},
    {'text': 'Google'},
    {'text': '  Microsoft  '}
]

# Define entity2id mapping
entity2id = {
    'Apple': 0,
    'Google': 1,
    'Microsoft': 2
}

# Construct ARGS dict with all parameters
ARGS = {
    'entity_list': entity_list,
    'entity2id': entity2id
}
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 list, ndim 1, 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
simplify_tuples Ran
ran, honoured the contract we drafted
nju-websoft/epr-kgqa/NSM_H/simplify_dataset.py
code served (permissive licence) · get_code("de9a3839e536c4c9")
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 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 torch
import numpy as np

torch.manual_seed(0)

# Construct the arguments for simplify_tuples function

# entity2id: maps entity text strings to integer IDs
entity2id = {
    'Alice': 0,
    'Bob': 1,
    'Charlie': 2,
    'Diana': 3
}

# relation2id: maps relation text strings to integer IDs
relation2id = {
    'knows': 0,
    'likes': 1,
    'works_with': 2
}

# tuple_list: list of triples, each containing subject, relation, object dicts
# Each dict has a 'text' key containing the entity/relation name
tuple_list = [
    (
        {'text': 'Alice'},
        {'text': 'knows'},
        {'text': 'Bob'}
    ),
    (
        {'text': 'Charlie'},
        {'text': 'likes'},
        {'text': 'Diana'}
    )
]

ARGS = {
    'tuple_list': tuple_list,
    'entity2id': entity2id,
    'relation2id': relation2id
}
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 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
load_result Not yet run
unverified (harvested, no recorded run)
nju-websoft/epr-kgqa/NSM_H/integrate_results.py
code served (permissive licence) · get_code("e96dad361f1ffebc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 7 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
to_list 41 other papers
38 dated earlier, 2 later, 1 same year, order not determinable
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
1910.06188 (2019-10)
Q8BERT: Quantized 8Bit BERT
1911.02984 (2019-11)
The TechQA Dataset
and 38 more not named here
load_dict 3 other papers
2 dated earlier, 1 later
2022.findings-emnlp.181 (2022 (year only))
ReaRev: Adaptive Reasoning for Question Answering over Knowledge Graphs
2310.15484 (2023-10)
NuTrea: Neural Tree Search for Context-guided Multi-hop KGQA
2405.20139 (2024-05)
GNN-RAG: Graph Neural Retrieval for Large Language Model Reasoning

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

Information retrieval (IR) methods for KGQA consist of two stages: subgraph extraction and answer reasoning. We argue current subgraph extraction methods underestimate the importance of structural dependencies among evidence facts. We propose Evidence Pattern Retrieval (EPR) to explicitly model the structural dependencies during subgraph extraction. We implement EPR by indexing the atomic adjacency pattern of resource pairs. Given a question, we perform dense retrieval to obtain atomic patterns formed by resource pairs. We then enumerate their combinations to construct candidate evidence patterns. These evidence patterns are scored using a neural model, and the best one is selected to extract a subgraph for downstream answer reasoning. Experimental results demonstrate that the EPR-based approach has significantly improved the F1 scores of IR-KGQA methods by over 10 points on ComplexWebQuestions and achieves competitive performance on WebQuestionsSP.

For agents

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

get_harvested_code_for_paper("2402.02175")
get_code_for_paper("2402.02175")
have("2402.02175")

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

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

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

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

Connect an agent — have() is free.