/GraphHarmony

Official implementation of "Graph Harmony: Denoising and Nuclear-Norm Wasserstein Adaptation for Enhanced Domain Transfer in Graph-Structured Data"

Primary LanguagePython

Graph Harmony: Denoising and Nuclear-Norm Wasserstein Adaptation for Enhanced Domain Transfer in Graph-Structured Data

The official implementation of "Graph Harmony: Denoising and Nuclear-Norm Wasserstein Adaptation for Enhanced Domain Transfer in Graph-Structured Data", TMLR 2024.

Paper

Requirements

  • python==3.9
  • numpy==1.23.1
  • scikit_learn==1.1.2
  • torch==1.12.1
  • A100 GPU

Datasets

The Ego-network dataset with 4 domains: OAG, Digg, Twitter, and Weibo.

The IMDB&Reddit dataset with 2 domains: IMDB-Binary and Reddit-Binary.

Download the datasets and put them into a folder called data_folder.

Baselines

DANN, MDD, DIVA, BIWAA, SDAT, ToAlign

Arguments

-backbone: Feature Extractor
-r: The random seed = r + 27 (0,1,2,3,4)
-data_path: The folder contains data files
-src_data: The source dataset
-tar_data: The target dataset

For the hyperparameter settings, please refer to the argument values.

Examples of Training with Our Method

  • Train on Ego-network dataset
python run_dnan.py \
--backbone gat \
--r 0 \
--data_path data_folder/data \ 
--src_data digg --tar_data oag --device cuda 
  • Train on IMDB&Reddit dataset
python run_dnan_ir.py \
--backbone gat \
--r 0 \
--data_path data_folder/ \
--src_data REDDIT-BINARY --tar_data IMDB-BINARY --device cuda

Reference

This repo is developed based on the codes provided by GraphDA.

Citation

If you find this repository useful, please kindly cite the following paper:

@article{
  wu2024graph,
  title={Graph Harmony: Denoising and Nuclear-Norm Wasserstein Adaptation for Enhanced Domain Transfer in Graph-Structured Data},
  author={Mengxi Wu and Mohammad Rostami},
  journal={Transactions on Machine Learning Research},
  issn={2835-8856},
  year={2024},
  url={https://openreview.net/forum?id=CSv7GgKHb6},
  note={}
}