Skip to content

kjh9503/caqr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 

Repository files navigation

CaQR

This repository contains Pytorch-based code implementing of paper "Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning (CaQR)"(paper).

Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning.
Jeonghoon Kim, Heesoo Jung, Hyeju Jang, and Hogun Park
Findings of the Association for Computational Linguistics, 2024

Our CaQR can be applied to query embedding-based methodologies such as Q2B, BetaE, and ConE.

The code and data in this repository are based on KGReasoning(repo).

Requirements

  • python==3.9.15
  • torch==1.13.1
  • tensorboard==2.11.0
  • tqdm

Basic Usage

  1. Make data directory in CaQR directory.
  2. Download the query dataset from the drive and move them in data directory (i.e., 'data/FB15k-237-betae', 'data/NELL-betae').

Q2B

To apply CaQR to Q2B, execute the shell file, q2b_caqr.sh in the CaQR/q2b directory:

bash q2b_caqr.sh

BetaE

To apply CaQR to BetaE, execute the shell file, betae_caqr.sh in the CaQR/betae directory:

bash betae_caqr.sh

ConE

To apply CaQR to ConE, execute the shell file, cone_caqr.sh in the CaQR/cone directory:

bash cone_caqr.sh

Citation

If CaQR is helpful in your research, we would appreciate it if you could cite our paper as follows:

@inproceedings{kim-etal-2024-improving-multi,
    title = "Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning",
    author = "Kim, Jeonghoon  and
      Jung, Heesoo  and
      Jang, Hyeju  and
      Park, Hogun",
    booktitle = "Findings of the Association for Computational Linguistics ACL 2024",
    year = "2024",
    address = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
    pages = "15978--15991",
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors