├── .gitignore ├── .gitmodules ├── ENV1.yaml ├── README.md ├── config └── kge │ └── fb15k-237-complex.yaml ├── convert_beta_dataset.py ├── convert_cqd_pretrain_ckpts.py ├── convert_kg_data_for_kge.py ├── convert_kg_data_for_ssl.py ├── read_eval_from_log.py ├── requirements.txt ├── script_prepare.sh ├── src ├── language │ ├── foq.py │ ├── grammar.py │ └── tnorm.py ├── pipeline │ ├── __init__.py │ ├── beam_reasoner.py │ ├── gradient_reasoner.py │ ├── lmpnn.py │ └── reasoner.py ├── structure │ ├── __init__.py │ ├── knowledge_graph.py │ ├── knowledge_graph_index.py │ ├── nbp_complex.py │ ├── nbp_conve.py │ ├── nbp_distmult.py │ ├── nbp_rescal.py │ ├── nbp_rotate.py │ ├── nbp_swtranse.py │ ├── nbp_transe.py │ └── neural_binary_predicate.py └── utils │ ├── __init__.py │ ├── config.py │ └── data.py └── train_lmpnn.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/.gitmodules -------------------------------------------------------------------------------- /ENV1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/ENV1.yaml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/README.md -------------------------------------------------------------------------------- /config/kge/fb15k-237-complex.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/config/kge/fb15k-237-complex.yaml -------------------------------------------------------------------------------- /convert_beta_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/convert_beta_dataset.py -------------------------------------------------------------------------------- /convert_cqd_pretrain_ckpts.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/convert_cqd_pretrain_ckpts.py -------------------------------------------------------------------------------- /convert_kg_data_for_kge.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/convert_kg_data_for_kge.py -------------------------------------------------------------------------------- /convert_kg_data_for_ssl.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/convert_kg_data_for_ssl.py -------------------------------------------------------------------------------- /read_eval_from_log.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/read_eval_from_log.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | tqdm 2 | jupyter 3 | pytorch=1.13 4 | -------------------------------------------------------------------------------- /script_prepare.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/script_prepare.sh -------------------------------------------------------------------------------- /src/language/foq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/language/foq.py -------------------------------------------------------------------------------- /src/language/grammar.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/language/grammar.py -------------------------------------------------------------------------------- /src/language/tnorm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/language/tnorm.py -------------------------------------------------------------------------------- /src/pipeline/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/pipeline/__init__.py -------------------------------------------------------------------------------- /src/pipeline/beam_reasoner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/pipeline/beam_reasoner.py -------------------------------------------------------------------------------- /src/pipeline/gradient_reasoner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/pipeline/gradient_reasoner.py -------------------------------------------------------------------------------- /src/pipeline/lmpnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/pipeline/lmpnn.py -------------------------------------------------------------------------------- /src/pipeline/reasoner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/pipeline/reasoner.py -------------------------------------------------------------------------------- /src/structure/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/__init__.py -------------------------------------------------------------------------------- /src/structure/knowledge_graph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/knowledge_graph.py -------------------------------------------------------------------------------- /src/structure/knowledge_graph_index.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/knowledge_graph_index.py -------------------------------------------------------------------------------- /src/structure/nbp_complex.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/nbp_complex.py -------------------------------------------------------------------------------- /src/structure/nbp_conve.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/nbp_conve.py -------------------------------------------------------------------------------- /src/structure/nbp_distmult.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/nbp_distmult.py -------------------------------------------------------------------------------- /src/structure/nbp_rescal.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/nbp_rescal.py -------------------------------------------------------------------------------- /src/structure/nbp_rotate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/nbp_rotate.py -------------------------------------------------------------------------------- /src/structure/nbp_swtranse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/nbp_swtranse.py -------------------------------------------------------------------------------- /src/structure/nbp_transe.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/nbp_transe.py -------------------------------------------------------------------------------- /src/structure/neural_binary_predicate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/structure/neural_binary_predicate.py -------------------------------------------------------------------------------- /src/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/utils/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/utils/config.py -------------------------------------------------------------------------------- /src/utils/data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/src/utils/data.py -------------------------------------------------------------------------------- /train_lmpnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HKUST-KnowComp/LMPNN/HEAD/train_lmpnn.py --------------------------------------------------------------------------------