Giter VIP home page Giter VIP logo

metag's Introduction

METAG: Learning Multiplex Representations on Text-Attributed Graphs with One Language Model Encoder

This repository contains the source code and datasets for Learning Multiplex Representations on Text-Attributed Graphs with One Language Model Encoder, published in NeurIPs 2023 (GFrontiers).

Links

Requirements

The code is written in Python 3.8. Before running, you need to first install the required packages by typing following commands (Using a virtual environment is recommended):

pip3 install -r requirements.txt

Overview

METAG contains one language model encoder to learn multiplex representations for nodes on text-attributed graphs.

Data

Processed Data

You can directly download the processed datasets here without conducting the following steps.

Raw Data

MAG data and Amazon data can be downloaded here: MAG Link and Amazon Link.

Representation learning

  1. Run the cells in tools/generate_data_{mag/amazon}.ipynb to generate sampled data for relation representation learning.
  2. Run src/scripts/prepare_data.sh to obtain processed data (random sample and split into train/val/test).

Downstream tasks

  1. Run the cells in tools/generate_downstream_{mag/amazon}.ipynb to generate data for downstream tasks.

Multiplex Representation Learning with METAG

Train:

cd src/
bash run_train_{MAG/amazon}.sh

Test:

bash run_test_group_{MAG/amazon}.sh

Downstream Task Inference

Direct source relation inference

bash downstream_match_test_zeroshot.sh

Learn to select source relation inference

bash downstream_{class/regression/match}_train.sh
bash downstream_{class/regression/match}_test.sh

Citations

Please cite the following paper if you find the code helpful for your research.

@article{jin2023learning,
  title={Learning Multiplex Embeddings on Text-rich Networks with One Text Encoder},
  author={Jin, Bowen and Zhang, Wentao and Zhang, Yu and Meng, Yu and Zhao, Han and Han, Jiawei},
  journal={arXiv preprint arXiv:2310.06684},
  year={2023}
}

metag's People

Contributors

petergriffinjin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.