Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

smore

> 编程语言
Open source

SMORe: Modularize Graph Embedding for Recommendation

375 stars0 likes0 views
WebsiteGitHub

About

SMORe: Modularize Graph Embedding for Recommendation

Build Status license Gitter chat for developers at https://gitter.im/dmlc/xgboost

RecSys'19 Slides Here

SMORe

This is a C++ framework for variant weighted network embedding techniques. We currently release the command line interface for following models:

  • DeepWalk
    • DeepWalk: online learning of social representations
  • Walklets
    • Don't Walk, Skip! Online Learning of Multi-scale Network Embeddings
  • LINE(Large-scale Information Network Embedding)
    • LINE: Large-scale Information Network Embedding
  • HPE (Heterogeneous Preference Embedding)
    • Query-based Music Recommendations via Preference Embedding
  • APP (Asymmetric Proximity Preserving graph embedding)
    • Scalable Graph Embedding for Asymmetric Proximity
  • MF (Matrix Factorization)
  • BPR (Bayesian Personalized Ranking)
    • BPR: Bayesian personalized ranking from implicit feedback
  • WARP-like
    • WSABIE: Scaling Up To Large Vocabulary Image Annotation
    • Learning to Rank Recommendations with the k-Order Statistic Loss
  • HOP-REC
    • HOP-Rec: High-Order Proximity for Implicit Recommendation
  • CSE (named nemf & nerank in cli)
    • Collaborative Similarity Embedding for Recommender Systems

In the near future, we will redesign the framework making some solid APIs for fast development on different network embedding techniques.

Developed Environment

  • g++ > 4.9 (In macOS, it needs OpenMP-enabled compilers. e.g. brew reinstall gcc6 --without-multilib)

Compilation

$ git clone https://github.com/cnclabs/smore
$ cd smore
$ make

Task

Given a network input:

txt
userA itemA 3
userA itemC 5
userB itemA 1
userB itemB 5
userC itemA 4

The model learns the representations of each vertex:

6 5
userA 0.0815412 0.0205459 0.288714 0.296497 0.394043
itemA -0.207083 -0.258583 0.233185 0.0959801 0.258183
itemC 0.0185886 0.138003 0.213609 0.276383 0.45732
userB -0.0137994 -0.227462 0.103224 -0.456051 0.389858
itemB -0.317921 -0.163652 0.103891 -0.449869 0.318225
userC -0.156576 -0.3505 0.213454 0.10476 0.259673

Command Line Interface

Directly call the execution file to see the usage like:

./cli/deepwalk
./cli/walklets
./cli/line
./cli/hpe
./cli/app
./cli/mf
./cli/bpr
./cli/warp
./cli/hoprec

then you will see the options description like:

…

Example Script

This shell script will help obtain the representations of the Youtube links in Youtube-links dataset.

bash
cd example
sh train_youtube.sh

Changing the number of threads in train_youtube.sh could speedup the process.

Running with Docker

  • Running with locally built image
    • Building docker image which is created following the instructions of Dockerfile
    bash
    docker build -t smore:latest .
    • Running container instantiated by image.
    bash
    docker run -it --name smore --rm -v "$PWD":/usr/local/smore/data smore:latest model_name -train training_dataset -save embedding [model_options]
    • Example:
    bash
    docker run -it --name smore --rm -v "$PWD":/usr/local/smore/data smore:latest  hpe -train net.txt -save rep.txt  
  • Running with published image
    • Running smore.sh
    bash
    ./smore.sh model_name -train training_dataset -save embedding [model_options]
    • Example:
    ./smore.sh model_name -train training_dataset -save embedding [model_options]

Related Work

You can find related work from awesome-network-embedding.

Citation

@inproceedings{smore,
author = {Chen, Chih-Ming and Wang, Ting-Hsiang and Wang, Chuan-Ju and Tsai, Ming-Feng},
title = {SMORe: Modularize Graph Embedding for Recommendation},
year = {2019},
booktitle = {Proceedings of the 13th ACM Conference on Recommender Systems},
series = {RecSys ’19}
}
@article{pronet2017,
  title={Vertex-Context Sampling for Weighted Network Embedding},
  author={Chih-Ming Chen and Yi-Hsuan Yang and Yian Chen and Ming-Feng Tsai},
  journal={arXiv preprint arXiv:{1711.00227}},
  year={2017}
}

Note

for HOP-REC & CSE, it is required to assign the field of each vertex in "vertex field" form:

userA u
userB u
userC u
itemA i
itemB i
itemC i
itemD i

by -field argument.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++knowledge-graphmatrix-factorizationnetwork-embeddingrepresentation-learning

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言