SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.02390 · 2021

Fuzzy Logic Based Logical Query Answering on Knowledge Graphs

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; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 6 failures of our instrument; 1 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/2108.02390.json · badge: /api/ran/2108.02390.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
hkust-knowcomp/sessioncqa community (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
artanh Ran
ran; our contract draft was wrong, not the code
hkust-knowcomp/sessioncqa/deduction_model/hype_util.py
code served (permissive licence) · get_code("d691d8a4eaf5a9d4")
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 torch.autograd

torch.manual_seed(0)

# The function artanh takes a single parameter x which should be a tensor
# The forward method clamps x to [-1 + 1e-15, 1 - 1e-15], so we need values in roughly [-1, 1]
# Create a small tensor with values in the valid range
x = torch.tensor([[0.1, 0.2, -0.3, 0.5],
                   [-0.2, 0.4, -0.1, 0.0]], dtype=torch.float32)

ARGS = {
    "x": x
}
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, 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
convert_to_arg Ran
ran; our contract draft was wrong, not the code
hkust-knowcomp/sessioncqa/deduction_model/cone.py
code served (permissive licence) · get_code("fa8f6d2163c007e7")
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

torch.manual_seed(0)

def convert_to_arg(x):
    pi = 3.141592653589793
    y = torch.tanh(2 * x) * pi / 2 + pi / 2
    return y

# Create a small tensor for x parameter
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
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
convert_to_axis Ran
ran; our contract draft was wrong, not the code
hkust-knowcomp/sessioncqa/deduction_model/cone.py
code served (permissive licence) · get_code("04df086ab269bc1f")
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

torch.manual_seed(0)

def convert_to_axis(x):
    y = torch.tanh(x) * 3.141592653589793
    return y

# The function takes a single parameter 'x' which should be a tensor
# It applies tanh and multiplies by pi
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
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
copy_or_set_ Ran
ran on a synthesized input
hkust-knowcomp/sessioncqa/deduction_model/hype_util.py
code served (permissive licence) · get_code("cddd529b67c2c84c")
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

torch.manual_seed(0)

# Create two tensors with different strides
# dest: a regular contiguous tensor
dest = torch.randn(2, 4)

# source: a tensor with different stride (e.g., transposed or sliced)
source = torch.randn(4, 2).t()

ARGS = {
    "dest": dest,
    "source": source,
}
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, 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
generate_mask_id Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hkust-knowcomp/sessioncqa/deduction_model/biqe.py
pointer only (licence: MIT); the stored copy get_code serves, from hkust-knowcomp/sqe, is pointer only (licence: NONE) · get_code("72ea1bc34098a010")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hkust-knowcomp/sqe, 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.

generate_position_id Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hkust-knowcomp/sessioncqa/deduction_model/biqe.py
pointer only (licence: MIT); the stored copy get_code serves, from hkust-knowcomp/sqe, is pointer only (licence: NONE) · get_code("3d2fd0493d53af42")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hkust-knowcomp/sqe, 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.

log_aggregation Ran
ran on a synthesized input
hkust-knowcomp/sessioncqa/deduction_model/evaluate_checkpoint.py
code served (permissive licence) · get_code("be662557190cd016")
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 numpy as np

# Create sample log dictionaries with various metrics
log1 = {
    'exd_accuracy': 0.85,
    'exd_loss': 0.25,
    'exd_num_answers': 5,
    'ent_accuracy': 0.90,
    'ent_loss': 0.15,
    'ent_num_answers': 3,
    'inf_accuracy': 0.78,
    'inf_loss': 0.32,
    'inf_num_answers': 4,
}

log2 = {
    'exd_accuracy': 0.88,
    'exd_loss': 0.22,
    'exd_num_answers': 6,
    'ent_accuracy': 0.92,
    'ent_loss': 0.12,
    'ent_num_answers': 0,  # This will cause ent_* metrics to be ignored
    'inf_accuracy': 0.80,
    'inf_loss': 0.30,
    'inf_num_answers': 5,
}

log3 = {
    'exd_accuracy': 0.82,
    'exd_loss': 0.28,
    'exd_num_answers': 0,  # This will cause exd_* metrics to be ignored
    'ent_accuracy': 0.91,
    'ent_loss': 0.14,
    'ent_num_answers': 4,
    'inf_accuracy': 0.79,
    'inf_loss': 0.31,
    'inf_num_answers': 0,  # This will cause inf_* metrics to be ignored
}

list_of_logs = [log1, log2, log3]

ARGS = {
    'list_of_logs': list_of_logs,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
tanh Ran
ran; our contract draft was wrong, not the code
hkust-knowcomp/sessioncqa/deduction_model/hype_util.py
code served (permissive licence) · get_code("be5af45dd86c2cc1")
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 torch.nn as nn

torch.manual_seed(0)

# The function takes x (a tensor) and clamp (an int)
# It calls x.clamp(-clamp, clamp).tanh()
# So x must be a tensor with clamp and tanh methods

x = torch.randn(2, 4)
clamp_value = 15

ARGS = {
    "x": x,
    "clamp": clamp_value
}
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, 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
abstraction Not yet run
unverified (harvested, no recorded run)
hkust-knowcomp/sessioncqa/deduction_model/dataloader.py
code served (permissive licence) · get_code("bf76d095212d3a7e")
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, 6 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 3 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
artanh 5 other papers
2 dated earlier, 3 later · 1 only as an assembly brick
1904.02239 (2019-04)
Hyperbolic Image Embeddings
2005.00545 (2020-05)
Low-Dimensional Hyperbolic Knowledge Graph Embeddings
2203.10833 (2022-03)
Hyperbolic Vision Transformers: Combining Improvements in Metric Learning
and 2 more not named here
tanh 4 other papers
1 dated earlier, 3 later · 1 only as an assembly brick
1904.02239 (2019-04)
Hyperbolic Image Embeddings
2203.10833 (2022-03)
Hyperbolic Vision Transformers: Combining Improvements in Metric Learning
2404.15523 (2024-04)
Understanding Hyperbolic Metric Learning through Hard Negative Sampling
and 1 more not named here
convert_to_arg 2 other papers
2 later
2109.08925 (2021-09)
Benchmarking the Combinatorial Generalizability of Complex Query Answering on Knowledge Graphs
2110.13715 (2021-10)
ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge Graphs
convert_to_axis 2 other papers
2 later
2109.08925 (2021-09)
Benchmarking the Combinatorial Generalizability of Complex Query Answering on Knowledge Graphs
2110.13715 (2021-10)
ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge Graphs
generate_mask_id 1 other paper
1 dated earlier
2004.02596 (2020-04)
Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoders
generate_position_id 1 other paper
1 dated earlier
2004.02596 (2020-04)
Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoders

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

Answering complex First-Order Logical (FOL) queries on large-scale incomplete knowledge graphs (KGs) is an important yet challenging task. Recent advances embed logical queries and KG entities in the same space and conduct query answering via dense similarity search. However, most logical operators designed in previous studies do not satisfy the axiomatic system of classical logic, limiting their performance. Moreover, these logical operators are parameterized and thus require many complex FOL queries as training data, which are often arduous to collect or even inaccessible in most real-world KGs. We thus present FuzzQE, a fuzzy logic based logical query embedding framework for answering FOL queries over KGs. FuzzQE follows fuzzy logic to define logical operators in a principled and learning-free manner, where only entity and relation embeddings require learning. FuzzQE can further benefit from labeled complex logical queries for training. Extensive experiments on two benchmark datasets demonstrate that FuzzQE provides significantly better performance in answering FOL queries compared to state-of-the-art methods. In addition, FuzzQE trained with only KG link prediction can achieve comparable performance to those trained with extra complex query data.

For agents

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

get_harvested_code_for_paper("2108.02390")
get_code_for_paper("2108.02390")
have("2108.02390")

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

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

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

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

Connect an agent — have() is free.