Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HKUST-KnowComp/WFRE
Wasserstein-Fisher-Rao Embedding: Logical Query Embeddings with Local Comparison and Global Transport (Findings-ACL 2023)
https://github.com/HKUST-KnowComp/WFRE
Last synced: 1 day ago
JSON representation
Wasserstein-Fisher-Rao Embedding: Logical Query Embeddings with Local Comparison and Global Transport (Findings-ACL 2023)
- Host: GitHub
- URL: https://github.com/HKUST-KnowComp/WFRE
- Owner: HKUST-KnowComp
- Created: 2023-05-02T16:12:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-04T10:18:17.000Z (over 1 year ago)
- Last Synced: 2024-08-02T19:37:42.097Z (3 months ago)
- Language: Python
- Homepage:
- Size: 82 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-logical-query - WFRE
README
# Wasseretein-Fisher-Rao Embedding
The implementation for ACL 2023 findings paper:
> Wasserstein-Fisher-Rao Embedding: Logical Query Embeddings with Local Comparison and Global Transport
by Zihao Wang, Weizhi Fei, Hang Yin, Yangqiu Song, Ginny Y. Wong, and Simon See.
# Prepare the data
The KG data (FB15k, FB15k-237, NELL995) should be put into under 'data/' folder. We use the [data](http://snap.stanford.edu/betae/KG_data.zip) provided in the [KGReasoning](https://github.com/snap-stanford/KGReasoning).
The structure of the data folder should be at least and we follow the query type of EFO-1 and transfer the data.
```
data
|---FB15k-237-betae
|---FB15k-betae
|---NELL-betae
```The OpsTree is generated by `binary_formula_iterator` in `fol/foq_v2.py`. The overall process is managed in `formula_generation.py`. Transform beta queries to EFO-1 is the next step.
To generate the formula and transform the queries data, just run
```bash
python formula_generation.py
python transform_beta_data.py
```# Run experiments on different knowledge graphs
The hyperparameters in three datasets is provided in config/papers.
To get our results in paper just run
```bash
python main.py -config config/papers/NELL.yaml
```