Giter VIP home page Giter VIP logo

asp2vec's Introduction

Unsupervised Differentiable Multi-aspect Network Embedding (asp2vec)

Overview

Network embedding is an influential graph mining technique for representing nodes in a graph as distributed vectors. However, the majority of network embedding methods focus on learning a single vector representation for each node, which has been recently criticized for not being capable of modeling multiple aspects of a node. To capture the multiple aspects of each node, existing studies mainly rely on offline graph clustering performed prior to the actual embedding, which results in the cluster membership of each node (i.e., node aspect distribution) fixed throughout training of the embedding model. We argue that this not only makes each node always have the same aspect distribution regardless of its dynamic context, but also hinders the end-to-end training of the model that eventually leads to the final embedding quality largely dependent on the clustering. In this paper, we propose a novel end-to-end framework for multi-aspect network embedding, called asp2vec, in which the aspects of each node are dynamically assigned based on its local context. More precisely, among multiple aspects, we dynamically assign a single aspect to each node based on its current context, and our aspect selection module is end-to-end differentiable via the Gumbel-Softmax trick. We also introduce the aspect regularization framework to capture the interactions among the multiple aspects in terms of relatedness and diversity. We further demonstrate that our proposed framework can be readily extended to heterogeneous networks. Extensive experiments towards various downstream tasks on various types of homogeneous networks and a heterogeneous network demonstrate the superiority of asp2vec.

Paper

Requirements

How to Run

git clone https://github.com/pcy1302/asp2vec.git
cd asp2vec/
conda create -n py36 python=3.6.8
source activate py36
conda install pytorch==1.2.0 torchvision==0.4.0 -c pytorch
pip install fastrand
conda install scikit-learn
cd src/

Execute asp2vec on Filmtrust dataset

python main.py --embedder asp2vec --dataset filmtrust --isSoftmax --isGumbelSoftmax --dim 20 --num_aspects 5 --isReg --isInit

Arguments

--embedder: name of the embedding method

--dataset: name of the dataset

--isInit: If True, warm-up step is performed

--iter_max: maximum iteration

--dim: dimension size of a node

--window_size: window_size to determine the context

--path_length: lentgh of each random walk

--num_neg: number of negative samples

--num_walks_per_node: number of random walks starting from each node

--lr: learning rate

--patience: when to stop (early stop criterion)

--isReg: enable aspect regularization framework

--reg_coef: lambda in aspect regularization framework

--threshold: threshold for aspect regularization

--isSoftmax: enable softmax

--isGumbelSoftmax: enable gumbel-softmax

--isNormalSoftmax: enable conventional softmax

--num_aspects: number of predefined aspects (K)

asp2vec's People

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.