Giter Site home page Giter Site logo

ceqa's Introduction

Complex Eventuality Query Answering (CEQA)

Official Implementation of paper: Complex Query Answering on Eventuality Knowledge Graph with Implicit Logical Constraints. If you would like to build your own query data, you can use the following instructions for data sampling. Note that you may need to adjust the directories in the Python scripts.

Data Sampling

All sampled & filtered data can be downloaded here, and you do not have to run the sampling code by yourself. The data we used in this paper is subsampled from ASER2.1, and it is called ASER-50k. The ASER-50K graph is available in the data file.

Query Sampling (without informational atomics)

In the first step, we sample the complex queries (without informational atomics) from the ASER-50K by running the file:

python sample_all_types_aser_train.py
python sample_all_types_aser_validation.py
python sample_all_types_aser_test.py

After this step, you will get many query files in the directory ./query_data (we provide a small data in the same format in ./query_data_dev for debugging and unit testing)

Sample Informational Atomics & Theorem Proving

These two steps are combined together, we sample some informational atomics for each query and then use the theorem provers to filter out the answers that are contradictory.

python filter_explanation.py

After this step, you will get the data files used for training and evaluation in the directory ./query_data_filtered (Similarly, we provide a small data in the same format in ./query_data_dev_filtered for debugging and unit testing)

Query Encoding with Memory Constraints

We implement all the models in ./model. In each model file, we have their original implementation and the inherited memory-enhanced version. For running the experiments, simply by using:

./run_gqe.sh
./run_gqe_con.sh

The _con.sh are constraint memory-enhanced models. You can replace gqe with q2p, mlp, and fuzzqe respectively. To monitor the training and evaluation process, you can use the tensorboard at log dir ../logs/gradient_tape

Citation

If you find the paper/data/code interesting, please cite our work:

@article{bai2023complex,
  title={Complex Query Answering on Eventuality Knowledge Graph with Implicit Logical Constraints},
  author={Bai, Jiaxin and Liu, Xin and Wang, Weiqi and Luo, Chen and Song, Yangqiu},
  journal={arXiv preprint arXiv:2305.19068},
  year={2023}
}

ceqa's People

Contributors

marcos0318 avatar

Stargazers

Leslie avatar Anna avatar  avatar Shi Haochen avatar  avatar  avatar  avatar Yangqiu Song avatar Weiqi Wang 王伟琪 avatar

Watchers

James Cloos avatar Yangqiu Song avatar

Forkers

marcos0318

ceqa's Issues

The sampled data is not complete.

The downloaded sample data is incomplete, and the project lacks many files that need to be read during training.and , the scripts named sample_all_types_aser_xx.py can't generate them at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.