SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.01899 · EMNLP · 2020

Dynamic Anticipation and Completion for Multi-Hop Reasoning over Sparse Knowledge Graph

Yichi Zhang, Wei Zhang, Zhiyuan Liu, Xu Han, Xin Lv, Juanzi Li, Lei Hou, Suhui Wu, Hao Kong

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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 11 have no contract verdict; 0 failures of our instrument; 0 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/2010.01899.json · badge: /api/ran/2010.01899.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
THU-KEG/DacKGR canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
FunctionStatusWhere it lives
batch_lookup Ran
ran on a synthesized input
THU-KEG/DacKGR/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
THU-KEG/DacKGR/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
THU-KEG/DacKGR/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
THU-KEG/DacKGR/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
compute_venn_areas Ran
ran on a synthesized input
THU-KEG/DacKGR/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
THU-KEG/DacKGR/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
THU-KEG/DacKGR/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_conve_kg_state_dict Ran
ran on a synthesized input
THU-KEG/DacKGR/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
THU-KEG/DacKGR/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
get_tucker_nn_state_dict Ran
ran on a synthesized input
THU-KEG/DacKGR/src/emb/fact_network.py
code served (permissive licence) · get_code("6be53e3a93f88cac")
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.W': torch.randn(4, 3),
        'mdl.bn0.weight': torch.randn(4),
        'mdl.bn0.bias': torch.randn(4),
        'mdl.bn0.running_mean': torch.randn(4),
        'mdl.bn0.running_var': torch.randn(4),
        'mdl.bn1.weight': torch.randn(4),
        'mdl.bn1.bias': torch.randn(4),
        'mdl.bn1.running_mean': torch.randn(4),
        'mdl.bn1.running_var': torch.randn(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
visualize_step Ran
ran on a synthesized input
THU-KEG/DacKGR/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 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 0 later) and 1 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 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
change_to_test_model_path 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
check_answer_ratio 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
check_relation_answer_ratio 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
compute_venn_areas 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
convert_to_dist 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
entropy 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
get_conve_kg_state_dict 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
get_conve_nn_state_dict 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping
visualize_step 1 other paper
1 dated earlier
1808.10568 (2018-08)
Multi-Hop Knowledge Graph Reasoning with Reward Shaping

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 has been widely studied in recent years to seek an effective and interpretable method for knowledge graph (KG) completion. Most previous reasoning methods are designed for dense KGs with enough paths between entities, but cannot work well on those sparse KGs that only contain sparse paths for reasoning. On the one hand, sparse KGs contain less information, which makes it difficult for the model to choose correct paths. On the other hand, the lack of evidential paths to target entities also makes the reasoning process difficult. To solve these problems, we propose a multi-hop reasoning model named DacKGR over sparse KGs, by applying novel dynamic anticipation and completion strategies: (1) The anticipation strategy utilizes the latent prediction of embeddingbased models to make our model perform more potential path search over sparse KGs. (2) Based on the anticipation information, the completion strategy dynamically adds edges as additional actions during the path search, which further alleviates the sparseness problem of KGs. The experimental results on five datasets sampled from Freebase, NELL and Wikidata show that our method outperforms state-of-the-art baselines. Our codes and datasets can be obtained from https:// github.com/THU-KEG/DacKGR.

For agents

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

get_harvested_code_for_paper("2010.01899")
get_code_for_paper("2010.01899")
have("2010.01899")

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

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

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

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

Connect an agent — have() is free.