Giter VIP home page Giter VIP logo

mmgcl's Introduction

MMGCL

Source code of our MMGCL

Multi-modal Graph Contrastive Learning for Micro-video Recommendation

Citation

If you want to use our codes in your research, please cite:

@inproceedings{yi2022multi,
  title={Multi-modal graph contrastive learning for micro-video recommendation},
  author={Yi, Zixuan and Wang, Xi and Ounis, Iadh and Macdonald, Craig},
  booktitle={Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval},
  pages={1807--1811},
  year={2022}
}

Environment

The codes of PGCL are implemented and tested under the following development environment:

  • numba==0.53.1
  • numpy==1.20.3
  • scipy==1.6.2
  • torch==1.10.3
  • torch_scatter==2.0.6

Usage

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

Datasets

You can find the full version of recommendation datasets via Tiktok, and Movielens. Since the copyright of datasets, we cannot release them directly.

Update:

We tend to submit this version to the multi modal recommendation library shortly.

mmgcl's People

Contributors

zxy-ml84 avatar

Stargazers

Lehui Li avatar Yuchao Ping avatar Liu Haiyu avatar  avatar  avatar Qu Xiaolong avatar Flipped avatar

Watchers

 avatar

Forkers

xiaowenrr

mmgcl's Issues

关于对比损失上的问题

我看到代码中的对比损失是以下内容进行对比:
logits_1 = torch.mm(users_sub_1, items_sub_1.T)
logits_1 /= self.ssl_temp
labels_1 = torch.tensor(list(range(users_sub_2.shape[0]))).to(self.device)
ssl_loss_1 = F.cross_entropy(logits_1, labels_1)

        logits_2 = torch.mm(users_sub_1, items_sub_1.T)
        logits_2 /= self.ssl_temp
        labels_2 = torch.tensor(list(range(users_sub_2.shape[0]))).to(self.device)
        ssl_loss_2 = F.cross_entropy(logits_2, labels_2)

        logits_3 = torch.mm(users_sub_1, neg_items_sub_1.T)
        logits_3 /= self.ssl_temp
        labels_3 = torch.tensor(list(range(users_sub_2.shape[0]))).to(self.device)
        ssl_loss_3 = - F.cross_entropy(logits_3, labels_3)
        ssl_loss = ssl_loss_1 + ssl_loss_2

首先ssl_loss_1 和ssl_loss_2 计算出来的难道不重复吗,其次我看论文中的是用户侧一个损失,项目测一个损失,是否是以下的代码:
logits_1 = torch.mm(users_sub_1, users_sub_2.T) / self.ssl_temp
labels_1 = torch.tensor(list(range(users_sub_1.shape[0]))).to(self.device)
ssl_loss_1 = F.cross_entropy(logits_1, labels_1)

        logits_2 = torch.mm(items_sub_1, items_sub_2.T) / self.ssl_temp
        labels_2 = torch.tensor(list(range(items_sub_1.shape[0]))).to(self.device)
        ssl_loss_2 = F.cross_entropy(logits_2, labels_2)
        ssl_loss = ssl_loss_1 + ssl_loss_2

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.