SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1808.10568 · 2018

Multi-Hop Knowledge Graph Reasoning with Reward Shaping

arXiv · PDF · Open in the Atlas

Code that ran

12 of 12 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; 0 failures of our instrument; 0 no recorded run), 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/1808.10568.json · badge: /api/ran/1808.10568.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
salesforce/MultiHopKG canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
kingsaint/InductiveExplainableLinkPrediction community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
batch_lookup Ran
ran on a synthesized input
salesforce/MultiHopKG/src/utils/ops.py
code served (permissive licence) · get_code("bf5d078656e9a5cb")
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, 2) 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)

# M is a [batch_size, seq_len] tensor representing a matrix where each row is an independent population
M = torch.randn(2, 4)

# idx is a [batch_size, sample_size] tensor of indices to look up from M
# Each row contains indices into the corresponding row of M
idx = torch.tensor([[0, 2], [1, 3]], dtype=torch.long)

# vector_output controls whether to return a 1-D vector when sample_size is 1
vector_output = True

ARGS = {
    "M": M,
    "idx": idx,
    "vector_output": vector_output,
}
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, 2) — shape (2, 2) 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
change_to_test_model_path Ran
ran on a synthesized input
salesforce/MultiHopKG/src/data_utils.py
code served (permissive licence) · get_code("cfe498d227766f79")
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 os

# The function operates on strings (dataset and model_path)
# It uses os.path operations to manipulate file paths
# No actual file I/O is performed, just path string manipulation

dataset = "cifar10"
model_path = "/home/user/models/cifar10.model_v1/checkpoint.pt"

ARGS = {
    "dataset": dataset,
    "model_path": model_path,
}
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 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
check_answer_ratio Ran
ran on a synthesized input
salesforce/MultiHopKG/src/data_utils.py
code served (permissive licence) · get_code("10c22da7cb9db158")
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
import numpy as np

# Analyze the function:
# - It takes 'examples' parameter
# - examples is iterated as tuples of (e1, e2, r)
# - e1 and e2 are used as dictionary keys and set members
# - r is not used
# - The function counts unique e2 values per e1, then averages across e1s

# Create sample examples with tuples of (e1, e2, r)
# Using strings for entities since they need to be hashable
examples = [
    ("entity_1", "entity_a", "relation_1"),
    ("entity_1", "entity_b", "relation_2"),
    ("entity_2", "entity_c", "relation_3"),
    ("entity_2", "entity_d", "relation_4"),
    ("entity_2", "entity_a", "relation_5"),
]

ARGS = {
    "examples": examples
}
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 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
check_relation_answer_ratio Ran
ran on a synthesized input
salesforce/MultiHopKG/src/data_utils.py
code served (permissive licence) · get_code("a7e3705996bcffee")
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 tempfile
import os

# Create a temporary directory and file for testing
temp_dir = tempfile.mkdtemp()
input_file = os.path.join(temp_dir, "test_input.txt")

# Write test data to the file
with open(input_file, 'w') as f:
    f.write("entity1 entity2 relation1\n")
    f.write("entity1 entity3 relation1\n")
    f.write("entity2 entity3 relation2\n")
    f.write("entity2 entity4 relation2\n")

# Create a minimal KG class that has the required attributes
class MinimalKG:
    def __init__(self):
        self.entity2id = {
            "entity1": 0,
            "entity2": 1,
            "entity3": 2,
            "entity4": 3
        }
        self.relation2id = {
            "relation1": 0,
            "relation2": 1
        }

kg = MinimalKG()

ARGS = {
    "input_file": input_file,
    "kg": kg
}
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
check_relation_answer_ratio Ran
ran on a synthesized input
kingsaint/InductiveExplainableLinkPrediction/src/data_utils.py
pointer only (licence: BSD-3-Clause) · get_code("567cf7c18073ed45")
How it ran

The body of this sample is withheld: BSD-3-Clause, as GitHub detects it on this paper's repository, kingsaint/InductiveExplainableLinkPrediction, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

compute_venn_areas Ran
ran on a synthesized input
salesforce/MultiHopKG/src/error_analysis/analysis_modules.py
code served (permissive licence) · get_code("84a0e853fae6b04f")
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
import numpy as np

class ModelErrors(object):
    def __init__(self, model_name):
        self.name = model_name
        self.top_1_error_cases = None
        self.top_10_error_cases = None

# Create sample ModelErrors instances with distinct error sets
model_error_1 = ModelErrors('Model_A')
model_error_1.top_1_error_cases = {1, 2, 3, 4, 5}
model_error_1.top_10_error_cases = {1, 2, 3, 4, 5, 6, 7}

model_error_2 = ModelErrors('Model_B')
model_error_2.top_1_error_cases = {3, 4, 5, 6, 7}
model_error_2.top_10_error_cases = {3, 4, 5, 6, 7, 8, 9}

model_error_3 = ModelErrors('Model_C')
model_error_3.top_1_error_cases = {5, 6, 7, 8, 9}
model_error_3.top_10_error_cases = {5, 6, 7, 8, 9, 10, 11}

model_error_list = [model_error_1, model_error_2, model_error_3]

ARGS = {
    'model_error_list': model_error_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 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
convert_to_dist Ran
ran on a synthesized input
salesforce/MultiHopKG/src/utils/ops.py
code served (permissive licence) · get_code("788b295e650aa151")
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. 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 numpy as np

torch.manual_seed(0)

# The function convert_to_dist takes a single parameter x
# Looking at the body:
# - x += EPSILON (in-place addition, so x must support this)
# - x / x.sum(1, keepdim=True) (division and sum along dimension 1)
# This indicates x should be a 2D tensor (batch, features)

# Create a small 2D tensor with batch size 2 and feature dimension 4
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
entropy Ran
ran on a synthesized input
salesforce/MultiHopKG/src/utils/ops.py
code served (permissive licence) · get_code("84a908f10b383452")
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 float, shape (2,) 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 numpy as np

torch.manual_seed(0)

# The function `entropy` takes a single parameter `p`
# Looking at the function body:
# - p is used with torch.sum() and torch operations
# - It's indexed with [1], so it's a 2D tensor
# - The -p * safe_log(p) operation suggests p is a probability distribution
# - The sum over dimension 1 suggests shape is (batch_size, num_classes)

# Create a small probability tensor with shape (2, 4)
# Batch size 2, 4 probability values per sample
p = torch.tensor([
    [0.25, 0.25, 0.25, 0.25],
    [0.1, 0.2, 0.3, 0.4]
], dtype=torch.float32)

ARGS = {
    "p": p
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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_complex_kg_state_dict Ran
ran on a synthesized input
salesforce/MultiHopKG/src/emb/fact_network.py
code served (permissive licence) · get_code("f19a8b7eac90f996")
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

torch.manual_seed(0)

# Create a state_dict structure that matches what the function expects
state_dict = {
    'state_dict': {
        'kg.entity_embeddings.weight': torch.randn(2, 4),
        'kg.relation_embeddings.weight': torch.randn(3, 4),
        'kg.entity_img_embeddings.weight': torch.randn(2, 5),
        'kg.relation_img_embeddings.weight': torch.randn(3, 5),
    }
}

ARGS = {
    'state_dict': state_dict
}
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
get_conve_kg_state_dict Ran
ran on a synthesized input
salesforce/MultiHopKG/src/emb/fact_network.py
code served (permissive licence) · get_code("54cd6b30f57076ba")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal state_dict structure that matches what the function expects
state_dict = {
    'state_dict': {
        'kg.entity_embeddings.weight': torch.randn(2, 4),
        'kg.relation_embeddings.weight': torch.randn(3, 4),
    }
}

ARGS = {
    'state_dict': state_dict
}
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
get_conve_nn_state_dict Ran
ran on a synthesized input
salesforce/MultiHopKG/src/emb/fact_network.py
code served (permissive licence) · get_code("2d2c990dd61cae71")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal state_dict that matches what the function expects
state_dict = {
    'state_dict': {
        'mdl.b': torch.randn(4),
        'mdl.conv1.weight': torch.randn(8, 3, 3, 3),
        'mdl.conv1.bias': torch.randn(8),
        'mdl.bn0.weight': torch.randn(3),
        'mdl.bn0.bias': torch.randn(3),
        'mdl.bn0.running_mean': torch.randn(3),
        'mdl.bn0.running_var': torch.randn(3),
        'mdl.bn1.weight': torch.randn(8),
        'mdl.bn1.bias': torch.randn(8),
        'mdl.bn1.running_mean': torch.randn(8),
        'mdl.bn1.running_var': torch.randn(8),
        'mdl.bn2.weight': torch.randn(16),
        'mdl.bn2.bias': torch.randn(16),
        'mdl.bn2.running_mean': torch.randn(16),
        'mdl.bn2.running_var': torch.randn(16),
        'mdl.fc.weight': torch.randn(10, 32),
        'mdl.fc.bias': torch.randn(10),
    }
}

ARGS = {
    'state_dict': state_dict
}
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
visualize_step Ran
ran on a synthesized input
salesforce/MultiHopKG/src/utils/vis.py
code served (permissive licence) · get_code("cde5ea85581be0d2")
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 AxesImage. 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 matplotlib.pyplot as plt
import numpy as np

# Create a figure and axis for plotting
fig, ax = plt.subplots()

# Define action_dist: a 1D numpy array of probability/distribution values
action_dist = np.array([0.1, 0.3, 0.4, 0.2])

# Define e: an episode number or identifier
e = 5

# Define action_space: a list of action labels
action_space = ['up', 'down', 'left', 'right']

# Define plot: a matplotlib axis object
plot = ax

ARGS = {
    'action_dist': action_dist,
    'e': e,
    'action_space': action_space,
    'plot': plot
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AxesImage — a AxesImage output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AxesImage 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

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 10 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 10 later) and 2 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
batch_lookup 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
change_to_test_model_path 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
check_answer_ratio 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
check_relation_answer_ratio 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
compute_venn_areas 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
convert_to_dist 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
entropy 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
get_conve_kg_state_dict 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
get_conve_nn_state_dict 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph
visualize_step 1 other paper
1 later
2010.01899 (2020-10)
Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph

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

Multi-hop reasoning is an effective approach for query answering (QA) over incomplete knowledge graphs (KGs). The problem can be formulated in a reinforcement learning (RL) setup, where a policy-based agent sequentially extends its inference path until it reaches a target. However, in an incomplete KG environment, the agent receives low-quality rewards corrupted by false negatives in the training data, which harms generalization at test time. Furthermore, since no golden action sequence is used for training, the agent can be misled by spurious search trajectories that incidentally lead to the correct answer. We propose two modeling advances to address both issues: (1) we reduce the impact of false negative supervision by adopting a pretrained one-hop embedding model to estimate the reward of unobserved facts; (2) we counter the sensitivity to spurious paths of on-policy RL by forcing the agent to explore a diverse set of paths using randomly generated edge masks. Our approach significantly improves over existing path-based KGQA models on several benchmark datasets and is comparable or better than embedding-based models.

For agents

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

get_harvested_code_for_paper("1808.10568")
get_code_for_paper("1808.10568")
have("1808.10568")

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

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

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

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

Connect an agent — have() is free.