Coder Social home page Coder Social logo

zjukg / earl Goto Github PK

View Code? Open in Web Editor NEW
12.0 5.0 0.0 101.2 MB

[Paper][AAAI2023] Entity-Agnostic Representation Learning for Parameter-Efficient Knowledge Graph Embedding

Home Page: https://arxiv.org/abs/2302.01849

Jupyter Notebook 13.70% Python 85.88% Shell 0.43%

earl's Introduction

EARL

This repository contains the experimental code for our AAAI 2023 paper: Entity-Agnostic Representation Learning for Parameter-Efficient Knowledge Graph Embedding. In this paper, we propose an entity-agnostic representation learning (EARL) method for handling the problem of inefficient parameter storage costs brought by embedding knowledge graphs.

Requirements

We run our code mainly based on PyTorch 1.11.0 and DGL 0.8.1 with CUDA. You can install cooresponding version based on your GPU resources. Furthermore, we useargparse to parse command lines.

Dataset

We put experimental datasets in ./data. Each dataset includes a train.txt, a valid.txt and a test.txt. entities.dict and relations.dict are used to map entities and relations into indices.

We use pre_process.ipynb to generate relaional features for entities (i.e., ent_rel_feat.pkl) and sample reserved entities (i.e., res_ent_0p1.pkl) for each dataset. We have generated these two files for each dataset and you can also run the process procedure yourself by using pre_process.ipynb.

Furthermore, unzip datasets before using them.

Quick Start

We give an example script for training and you can try the following command line:

bash script/train.sh

The training process, validation results, and final test results will be printed and saved in the corresponding log file. After training, you can find training logs in the log folder and the tensorboad logs are saved in the tb_log folder.

Moreover, you can try different datasets and settings by changing arguments in the main.py.

Citation

If you use or extend our work, please cite the following paper:

@inproceedings{EARL,
  author    = {Mingyang Chen and
               Wen Zhang and
               Zhen Yao and
               Yushan Zhu and
               Yang Gao and
               Jeff Z. Pan and
               Huajun Chen},
  title     = {Entity-Agnostic Representation Learning for Parameter-Efficient Knowledge Graph Embedding},
  booktitle = {{AAAI}},
  year      = {2023}
}

earl's People

Contributors

anselcmy avatar

Stargazers

Zhongyu He avatar Menglu Li avatar Yang avatar WWWbf avatar Jack_Gu avatar  avatar Jeff Carpenter avatar WangZhen avatar yueliu1999 avatar Yao Zhen avatar  avatar  avatar

Watchers

Huajun Chen avatar  avatar  avatar Kostas Georgiou avatar Jack_Gu 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.