Giter Club home page Giter Club logo

parameter_inference_efficient_pie's Introduction

PIE: a Parameter and Inference Efficient Solution for Large Scale Knowledge Graph Embedding Reasoning

Paper link: https://arxiv.org/abs/2204.13957

Results

The results of PIE powered TransE model is as follows.

ogb-lsc-wikikg90mv2

#Parameters Test MRR Valid MRR
TransE-shallow-PIE 18,247,074,200 0.1883 0.2342

System requirements:

It's recommended to use a machine with over 400G memory to reproduce the results.

Reproducing the Results on WikiKG90Mv2


1, Entity Typing

The model implementation is based on PathCon. Thanks for their contributions.

cd entity_typing && sh run.sh DATA_PATH

The ${DTA_PATH} should conatin train_hrt.npy.

After model training and inference, the code will output the distributuon p(r|e) for each entity. As the dataset is too large, we save the results with 15 sparse matrices. Please use src/cat_npz.py to concatenate all the sparse matrices. cd src && python/cat_npz.py $SAVE_PATH This will save the $p(r|e)$ matrix for all entities at ${SAVE_PATH}/e2r_scores.npz.

2, Candidate Generation

The sampling implementation is based on dgl-ke. Thanks for their contributions.

cd candidate && sh run.sh DATA_PATH

The ${DATA_PATH} should contain folders, such as 'raw' and 'processed'. As we utilize multi processer to sampling the candidates and each processor saves the result individually, please use script src/cat.py to concatenate all the candidates to one file.

3, Knowledge Graph Embedding Reansoning

The KGE implementation is based on the official baseline code of WikiKG90M OGB. Thanks for their contributions.

cd wikikg90m-v2
sh install_dgl.sh
sh run.sh DATA_PATH SAVE_PATH
sh run_test.sh SAVE_PATH DATA_PATH VAL_CANDIDATE_PATH TEST_CANDIDATE_PATH

parameter_inference_efficient_pie's People

Contributors

kgepairre avatar antfin-oss avatar

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.