{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/text-efo-k-cqa-towards-knowledge-graph","title":"$\\text{EFO}_{k}$-CQA: Towards Knowledge Graph Complex Query Answering beyond Set Operation","arxiv_id":"2307.13701","date":"2023-07-15","proceeding":null,"authors":["Hang Yin","ZiHao Wang","Weizhi Fei","Yangqiu Song"],"abstract":"To answer complex queries on knowledge graphs, logical reasoning over incomplete knowledge is required due to the open-world assumption. Learning-based methods are essential because they are capable of generalizing over unobserved knowledge. Therefore, an appropriate dataset is fundamental to both obtaining and evaluating such methods under this paradigm. In this paper, we propose a comprehensive framework for data generation, model training, and method evaluation that covers the combinatorial space of Existential First-order Queries with multiple variables ($\\text{EFO}_{k}$). The combinatorial query space in our framework significantly extends those defined by set operations in the existing literature. Additionally, we construct a dataset, $\\text{EFO}_{k}$-CQA, with 741 types of query for empirical evaluation, and our benchmark results provide new insights into how query hardness affects the results. Furthermore, we demonstrate that the existing dataset construction process is systematically biased that hinders the appropriate development of query-answering methods, highlighting the importance of our work. Our code and data are provided in~\\url{https://github.com/HKUST-KnowComp/EFOK-CQA}.","url_abs":"https://arxiv.org/abs/2307.13701v1","url_pdf":"https://arxiv.org/pdf/2307.13701v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"text-efo-k-cqa-towards-knowledge-graph","repo_url":"https://github.com/hkust-knowcomp/efok-cqa","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"complex-query-answering","task_name":"Complex Query Answering"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"logical-reasoning","task_name":"Logical Reasoning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2307.13701","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.13701"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hkust-knowcomp/efok-cqa","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":5,"ran_fixture":1,"ran_honours":2,"unverified":2},"by_repo_kind":{"official":{"samples":11,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"84eb10126b44cd7c","entry":"read_from_yaml","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"QG_EFOX.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/QG_EFOX.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"84eb10126b44cd7c"}},{"code_sha256_prefix":"2c5d6c341e63248e","entry":"align_entities_relations","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"convert_beta_dataset.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/convert_beta_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2c5d6c341e63248e"}},{"code_sha256_prefix":"dfaa9a08584100be","entry":"compute_batch_score_complex","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"data_preparation/compute_score.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/data_preparation/compute_score.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dfaa9a08584100be"}},{"code_sha256_prefix":"1869521a4be75145","entry":"compute_batch_score_distmult","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"data_preparation/compute_score.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/data_preparation/compute_score.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1869521a4be75145"}},{"code_sha256_prefix":"8c0698d90001cd35","entry":"compute_batch_score_transe","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"data_preparation/compute_score.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/data_preparation/compute_score.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c0698d90001cd35"}},{"code_sha256_prefix":"25412604ebe7d821","entry":"load_beta_model","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"QG_EFOX.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/QG_EFOX.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"25412604ebe7d821"}},{"code_sha256_prefix":"4c08e440ba7f3e8c","entry":"load_model","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"QG_EFOX.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/QG_EFOX.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4c08e440ba7f3e8c"}},{"code_sha256_prefix":"8e7c46d561388d36","entry":"log_add_metric","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"evaluate_lmpnn.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/evaluate_lmpnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8e7c46d561388d36"}},{"code_sha256_prefix":"e9bc5bf12edea40c","entry":"ranking2metrics","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"evaluate_lmpnn.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/evaluate_lmpnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e9bc5bf12edea40c"}},{"code_sha256_prefix":"67f4ee4ad4d0d75f","entry":"construct_matrix_list","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"FIT.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/FIT.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67f4ee4ad4d0d75f"}},{"code_sha256_prefix":"34cfe3992789f9f7","entry":"evaluate_batch_joint","repo":"hkust-knowcomp/efok-cqa","repo_kind":"official","path":"evaluate_lmpnn.py","file_url":"https://github.com/hkust-knowcomp/efok-cqa/blob/HEAD/evaluate_lmpnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"34cfe3992789f9f7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}