SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2025.findings-emnlp.582 · EMNLP Findings · 2025

KaeDe: Progressive Generation of Logical Forms via Knowledge-Aware Question Decomposition for Improved KBQA

Jian Cao, Shiyou Qian, Ranran Bu, Jianqi Gao, Hongming Cai

Open in the Atlas

Code that ran

7 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 4 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2025.findings-emnlp.582.json · badge: /api/ran/2025.findings-emnlp.582.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
pvfeldt/KaeDe canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
Find_P_R_F_HIT Ran
ran, honoured the contract we drafted
pvfeldt/KaeDe/evaluation/evaluate.py
code served (permissive licence) · get_code("2d1da42040523a72")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - fp: used in arithmetic (tp + fp), appears to be a numeric value
# - tp: used in arithmetic (tp / (tp + fp), tp / (tp + fn), tp > 1e-40), appears to be a numeric value
# - fn: used in arithmetic (tp + fn), appears to be a numeric value
# All three parameters are used in division and comparison operations, so they should be numeric (int or float)

# Create test values
fp = 5.0  # false positives
tp = 10.0  # true positives
fn = 3.0  # false negatives

ARGS = {
    "fp": fp,
    "tp": tp,
    "fn": fn
}
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 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
FindstrInList Ran
ran, violated the contract we drafted
pvfeldt/KaeDe/evaluation/evaluate.py
code served (permissive licence) · get_code("755b33278af88592")
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 bool, 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

torch.manual_seed(0)

ARGS = {
    "entry": "hello",
    "elist": ["hello world", "goodbye", "hello there", "foo bar"]
}
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 bool, 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
ans_acc Ran
ran, honoured the contract we drafted
pvfeldt/KaeDe/evaluation/evaluate.py
code served (permissive licence) · get_code("ecfff8124157e574")
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 torch
import numpy as np

torch.manual_seed(0)

# Build valid arguments for ans_acc(predict, gold)
# The function expects:
# - predict: a list of strings (predictions)
# - gold: a list of strings (gold/reference answers)

predict = [
    "Paris",
    "France",
    "Europe"
]

gold = [
    "Paris",
    "Berlin",
    "London"
]

ARGS = {
    "predict": predict,
    "gold": gold
}
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 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
append_golden Ran
ran; our contract draft was wrong, not the code
pvfeldt/KaeDe/evaluation/process_results.py
code served (permissive licence) · get_code("a7ee9ca1509abb01")
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 torch
import numpy as np

torch.manual_seed(0)

# Based on the function, predict_data and golden_data are lists of dicts
# predict_data items need: 'index' key
# golden_data items need: 'answer_entities' key (which is a dict)

predict_data = [
    {
        'index': '0',
        'some_field': 'value1'
    },
    {
        'index': '1',
        'some_field': 'value2'
    }
]

golden_data = [
    {
        'answer_entities': {
            'entity1': 'answer_a',
            'entity2': 'answer_b'
        }
    },
    {
        'answer_entities': {
            'entity3': 'answer_c',
            'entity4': 'answer_d',
            'entity5': 'answer_e'
        }
    }
]

ARGS = {
    'predict_data': predict_data,
    'golden_data': golden_data
}
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 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
get_value_for_year Ran
ran; our contract draft was wrong, not the code
pvfeldt/KaeDe/entity_retrieval/aqqu_entity_linker.py
code served (permissive licence) · get_code("572a76bdb7ce1656")
How it ran

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

import torch

def get_value_for_year(year):
    """Return the correct value representation for a year."""
    return '%s' % year

# The function takes a single parameter 'year' and converts it to a string
# year should be a numeric value (int or similar)
ARGS = {
    'year': 2023
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
refine_answers Ran
ran; our contract draft was wrong, not the code
pvfeldt/KaeDe/evaluation/process_results.py
code served (permissive licence) · get_code("bb275268dc566878")
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 torch

torch.manual_seed(0)

# Analyzing the function:
# - Takes 'data' parameter
# - Iterates over data with indexing: data[i]
# - Each data[i] is a dict with keys 'searched_answers' and 'refined_answers'
# - data[i]['searched_answers'] is a list of lists of strings
# - data[i]['refined_answers'] is a list of strings
# - Filters strings that don't contain 'm.' or 'g.'

data = [
    {
        'searched_answers': [
            ['answer1', 'answer2', 'm.answer3'],
            ['answer4', 'g.answer5']
        ]
    },
    {
        'searched_answers': [
            ['answer6', 'answer7'],
            ['m.answer8', 'answer9', 'g.answer10']
        ]
    }
]

ARGS = {
    'data': data
}
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 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
remove_abbreviations_from_entity_name Ran
ran; our contract draft was wrong, not the code
pvfeldt/KaeDe/entity_retrieval/aqqu_util.py
code served (permissive licence) · get_code("2b8c76f1ff45f86e")
How it ran

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

import torch
import numpy as np

# Analyze the function:
# - entity_name: a string that gets lowercased and split by spaces
# - abbreviations: a collection that supports 'in' operator for membership testing
# The function filters out tokens that are in the abbreviations collection

ARGS = {
    "entity_name": "IBM Research Center USA",
    "abbreviations": {"ibm", "usa", "llc", "inc"}
}
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 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
load_config Not yet run
unverified (harvested, no recorded run)
pvfeldt/KaeDe/llamafactory/model/loader.py
code served (permissive licence) · get_code("283763c1c1ad47ff")
How it ran

no invocation recorded.

normalize_entity_name Not yet run
unverified (harvested, no recorded run)
pvfeldt/KaeDe/entity_retrieval/aqqu_util.py
code served (permissive licence) · get_code("3e26392429922f6f")
How it ran

no invocation recorded.

patch_valuehead_model Not yet run
unverified (harvested, no recorded run)
pvfeldt/KaeDe/llamafactory/model/patcher.py
code served (permissive licence) · get_code("9dcc10d9409f0809")
How it ran

no invocation recorded.

read_abbreviations Not yet run
unverified (harvested, no recorded run)
pvfeldt/KaeDe/entity_retrieval/aqqu_util.py
code served (permissive licence) · get_code("3e0e55a1459eb4f0")
How it ran

no invocation recorded.

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, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
get_value_for_year 1 other paper
1 later
2603.20017 (2026-03)
RouterKGQA: Specialized-General Model Routing for Constraint-Aware Knowledge Graph Question Answering
load_config 1 other paper
1 same year, order not determinable
2502.12143 (2025-02)
Small Models Struggle to Learn from Strong Reasoners
patch_valuehead_model 1 other paper
1 same year, order not determinable
2502.12143 (2025-02)
Small Models Struggle to Learn from Strong Reasoners
read_abbreviations 1 other paper
1 later
2603.20017 (2026-03)
RouterKGQA: Specialized-General Model Routing for Constraint-Aware Knowledge Graph Question Answering
remove_abbreviations_from_entity_name 1 other paper
1 later
2603.20017 (2026-03)
RouterKGQA: Specialized-General Model Routing for Constraint-Aware Knowledge Graph Question Answering

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

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

Abstract

Knowledge base question answering (KBQA) refers to the task of answering natural language questions using large-scale structured knowledge bases (KBs). Existing semantic parsingbased (SP-based) methods achieve superior performance by directly converting questions into structured logical form (LF) queries using fine-tuned large language models (LLMs). However, these methods face the key challenge of difficulty in directly generating LFs for complex graph structures, which often leads to non-executable LFs that negatively impact overall KBQA performance. To address this challenge, we propose KaeDe, a novel generate-then-retrieve method for KBQA. This approach integrates Knowledge-aware question Decomposition and subsequent progressive LF generation within the generation phase, followed by an unsupervised retrieval phase. Specifically, the original question is decomposed into simplified, topic entity-centric sub-questions and explanations within the KB context. Path-level LFs are derived from these intermediate expressions and then combined into a comprehensive graph-level LF. Finally, the LF is refined through unsupervised entity and relation retrieval. Experimental results demonstrate that our method achieves stateof-the-art (SOTA) performance on WebQues-tionSP (WebQSP) and ComplexWebQuestions (CWQ) benchmarks, particularly with fewer model parameters. The code is available at https://github.com/pvfeldt/KaeDe.

For agents

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

get_harvested_code_for_paper("2025.findings-emnlp.582")
get_code_for_paper("2025.findings-emnlp.582")
have("2025.findings-emnlp.582")

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

curl https://syntology.ai/api/ran/2025.findings-emnlp.582.json

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

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

Connect an agent — have() is free.