Skip to content

umsimonchen/ForwardRec

Repository files navigation

"ForwardRec": Aggregate, Optimize, and Forward: A Forward-Forward Algorithm Framework for Graph-Based Recommendation

Flag Counter fig_main

ForwardRec, a novel graph recommendation framework based on the Forward-Forward (FF) algorithm built on the SELFRec, introduces two core components. Forward Learning: ForwardRec tackles semantic and frequency issues by disentangling each layer independently; Hierarchical Rejection Sampling (HRS): To provide precise and comprehensive semantics for optimization, HRS conducts a layer-specific hierarchical negative sampling.

Requirements

numba==0.53.1
numpy==1.20.3
scipy==1.6.2
tensorflow==1.14.0
torch>=1.7.0

Usage

  1. Configure the xx.conf file in the directory named conf. (xx is the name of the model you want to run)
  2. Run main.py and choose the model you want to run.

Ablated Variants

We provide the variants shown in ablation analysis for LightGCN, LGCN, DHCF, SGL, and MixGCF. The codes are placed in the model file along with their original codes. Please uncomment the corresponding code for proper running.

Supplementary Experiments

Regarding all case studies and supplementary experiments, please refer to the folder "ForwardRec_exp/".

Large Datasets

Due to the large files, please download the MovieLens-10M on https://files.grouplens.org/datasets/movielens/ml-10m.zip and place it into the folder "dataset/ml-10M" and split the dataset into the training set and the test set by "split.py".

Implemented Models

Model Paper Type Code
SASRec Kang et al. Self-Attentive Sequential Recommendation, ICDM'18. Sequential PyTorch
CL4SRec Xie et al. Contrastive Learning for Sequential Recommendation, ICDE'22. Sequential PyTorch
BERT4Rec Sun et al. BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer, CIKM'19. Sequential PyTorch
Model Paper Type Code
ChebyCF Kim et al. Graph Spectral Filtering with Chebyshev Interpolation for Recommendation, SIGIR'25. Graph+DM PyTorch
HDRM Yuan et al. Hyperbolic Diffusion Recommender Model, WWW'25. DM PyTorch
SGCL Zhao et al. Symmetric Graph Contrastive Learning against Noisy Views for Recommendation, TOIS'25. Graph + CL PyTorch
DDRM Zhao et al. Denoising Diffusion Recommender Model, SIGIR'24. Graph + DM PyTorch
GiffCF Zhu et al. Graph Signal Diffusion Model for Collaborative Filtering, SIGIR'24. Graph + DM PyTorch
AHNS Lai et al. Adaptive Hardness Negative Sampling for Collaborative Filtering, AAAI'24. Graph + NS PyTorch
BSPM Choi et al. Blurring-Sharpening Process Models for Collaborative Filtering, SIGIR'23. Graph + DM PyTorch
DiffRec Wang et al. Diffusion Recommender Model, SIGIR'23. DM PyTorch
CODIGEM Walker et al. Recommendation via Collaborative Diffusion Generative Model, KSEM'22. DM PyTorch
LinkProp Fu et al. Revisiting Neighborhood-based Link Prediction for Collaborative Filtering, WWW'22. Graph PyTorch
MixGCF Huang et al. MixGCF: An Improved Training Method for Graph Neural Network-based Recommender Systems, KDD'21. Graph + NS PyTorch
SSL4Rec Yao et al. Self-supervised Learning for Large-scale Item Recommendations, CIKM'21. Graph + CL PyTorch
LightGCN He et al. LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation, SIGIR'20. Graph PyTorch
MultiVAE Liang et al. Variational Autoencoders for Collaborative Filtering, WWW'18. AE PyTorch
NeuMF He et al. Neural Collaborative Filtering, WWW'17. - PyTorch
CDAE Wu et al. Collaborative Denoising Auto-Encoders for Top-N Recommender Systems, WSDM'16. AE PyTorch
MF Yehuda et al. Matrix Factorization Techniques for Recommender Systems, IEEE Computer'09. - PyTorch
* CL is short for contrastive learning (including data augmentation) only; DA is short for data augmentation only; NS is short for negative sampling (including CL+NS); DM is short for diffusion model (diffusion-like, e.g., flow models); AE is short for autoencoders.

Reference

**FuxiRec** is a Python framework based on **SELFRec**, which integrates commonly used datasets and metrics, and implements many state-of-the-art models. It has a lightweight architecture and provides user-friendly interfaces. It can facilitate model implementation and evaluation.
If you find this repo helpful to your research, please cite our paper and the base framework from Yu.

@article{chen2026tri,
  title={Towards a Tri-View Diffusion Framework for Recommendation},
  author={Chen, Ximing and Lei, Pui Ieng and Sheng, Yijun and Liu, Yanyan and Gong, Zhiguo},
  journal={The 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year={2026},
  publisher={ACM}
}
@article{yu2023self,
  title={Self-supervised learning for recommender systems: A survey},
  author={Yu, Junliang and Yin, Hongzhi and Xia, Xin and Chen, Tong and Li, Jundong and Huang, Zi},
  journal={IEEE Transactions on Knowledge and Data Engineering},
  year={2023},
  publisher={IEEE}
}

About

[DASFAA'2026] "ForwardRec: Aggregate, Optimize, and Forward; A Forward-Forward Algorithm Framework for Graph-Based Recommendation"

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors