GithubHelp home page GithubHelp logo

llljx316 / cdnmf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 6lyc/cdnmf

0.0 0.0 0.0 37.43 MB

Official implementation of our paper "Contrastive Deep Nonnegative Matrix Factorization for Community Detection", ICASSP 2024.

Python 100.00%

cdnmf's Introduction

CDNMF: Contrastive Deep Nonnegative Matrix Factorization for Community Detection

PWC

The implementation of our paper "Contrastive Deep Nonnegative Matrix Factorization for Community Detection". (ICASSP 2024, CCF B)

Overview

framework We introduce the idea of contrastive learning (CL) into the nonnegative matrix factorization (NMF) for community detection (CD) for the first time, solving the problems of the existing work.

The two modules are mutually reinforcing and naturally coupled: On the one hand, with the help of CL, positive samples are contrasted to allow the NMF to learn both the graph topological and attribute signals, while negative samples are contrasted to make the embedding space from NMF more suitable for CD; On the other hand, with the help of NMF's outputs, more accurate negative samples can be obtained in CL. Moreover, NMF increases the interpretability of the existing framework.

Abstract

Recently, nonnegative matrix factorization (NMF) has been widely adopted for community detection, because of its better interpretability. However, the existing NMF-based methods have the following three problems: 1. they directly transform the original network into community membership space, so it is difficult for them to capture the hierarchical information; 2. they often only pay attention to the topology of the network and ignore its node attributes; 3. it is hard for them to learn the global structure information necessary for community detection. Therefore, we propose a new community detection algorithm, named Contrastive Deep Nonnegative Matrix Factorization (CDNMF). Firstly, we deepen NMF to strengthen its capacity for information extraction. Subsequently, inspired by contrastive learning, our algorithm creatively constructs network topology and node attributes as two contrasting views. Furthermore, we utilize a debiased negative sampling layer and learn node similarity at the community level, thereby enhancing the suitability of our model for community detection. We conduct experiments on three public real graph datasets and the proposed model has achieved better results than state-of-the-art methods.

Requirements

To install the dependencies: pip install -r requirements.txt.

DataSets

The code takes an input graph in a txt file. Sample graphs for the Cora, Citeseer, PubMed and Wiki is included in the Database/ directory.

Quick Start

Running shell for Cora:
python script_cora.py

Running shell for Citeseer:
python script_citeseer.py

Running shell for PubMed:
python script_pubmed.py

Community Detection Results and Convergence

Performance on Cora, Citeseer and PubMed (20 runs):
results

Convergence Rate on Cora, Citeseer:
convergence

Citation

Please cite our paper if you use this code or our model in your own work:

@article{li2023contrastive,
title={Contrastive Deep Nonnegative Matrix Factorization for Community Detection},
author={Li, Yuecheng and Chen, Jialong and Chen, Chuan and Yang, Lei and Zheng, Zibin},
journal={arXiv preprint arXiv:2311.02357},
year={2023}
}

cdnmf's People

Contributors

6lyc avatar

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.