Skip to content
Open access

Motif–aware graph masked autoencoder for community detection

Jun 2026 · Journal of King Saud University: Computer and Information Sciences · Vol 38 · 0 citations · 52 references

Abstract

Community detection aims to uncover mesoscopic organization in graphs by grouping nodes into densely connected communities, and it plays an important role in analyzing citation networks, social systems, and other complex relational data. In practice, this task is challenging because community structures are determined not only by pairwise connectivity, but also by higher-order structural patterns such as motifs. Existing Graph Masked Autoencoders (GMAEs), although effective for self-supervised graph representation learning, usually rely on random node or edge masking and pairwise reconstruction objectives. As a result, they may fail to preserve the higher-order structural regularities that are crucial for identifying coherent communities. To address this issue, we propose a Motif-aware Graph Masked Autoencoder (MGMAE) for community detection. The proposed framework explicitly incorporates triangle motifs into both the masking and reconstruction processes. Specifically, MGMAE first enumerates motif structures as higher-order supervision targets, then constructs perturbed graphs through a joint motif–edge masking strategy, and finally learns node representations by jointly reconstructing masked edges and masked motifs. In this way, the learned embeddings are encouraged to preserve both local connectivity and higher-order cohesion patterns that are closely related to community organization. Extensive experiments on six real-world attributed networks and five synthetic LFR benchmarks demonstrate that MGMAE achieves highly competitive performance against representative baselines in terms of NMI and ARI. Additional ablation and hyperparameter studies further verify the effectiveness of the proposed motif-aware masking and reconstruction design.

Read PDF

Similar papers

Open access Jul 2026

Graphlet-based edge weighting for improved community detection in complex networks

Community detection is essential for uncovering the functional organization of complex networks. While traditional methods often rely on edge density, motif-based approaches use higher-order structural patterns to identify communities. However, existing research frequently employs conventional motifs, such as triangles or 4-node cliques, or lacks validation against networks with ground-truth communities. This study addresses these limitations by systematically evaluating eight small motifs across both synthetic and real-world networks with known community structures. We propose a framework that transforms unweighted graphs into weighted representations by assigning weights to node pairs based on their co-occurrence frequency within specific graphlets, while also preserving information about the original edges, rather than creating a potentially sparse (hyper)network. Thus, graphlet adjacency captures the topological complexity of a node by accounting for both its direct edges and the local connectivity patterns of its neighbors; this higher-order information is vital for accurate community detection. Our results demonstrate that graphlet-based weighting significantly enhances community detection in networks. We find that no single "universal" motif optimizes performance across all real-world networks. Rather than favoring only dense, clique-based structures, our findings highlight that simpler motifs can also provide strong performance in networks. These results suggest that relying exclusively on cliques may overlook critical connectivity patterns, offering a new perspective on how higher-order structures define communities in networks.

Anastasiia Dziuba, Jure Pražnikar · 0 citations
Conference Jul 2026

MACO-MGDT: Overlapping Community Detection in Heterogeneous Networks via Community-Aware Embeddings

The community detection is a basic task of network analysis, which allows identifying clusters of network nodes with rich internal relationships and structural similarity. The classical community detection algorithms usually assume the network is homogeneous and impose hard assignments of clusters, which restricts their use to real world networks where nodes tend to be a member of more than one cluster and where different types of nodes and attributes are prevalent. To overcome those issues we suggest MACO-MGDT, a single framework of overlapping community detection in non homogenous graphs. The suggested system combines community-conscious representation learning and prototype-based clustering in a two-step architecture. The Multi-scale Attribute-aware Community-Oriented (MACO) module is trained in the first stage to learn structure-aware node embeddings via type-sensitive feature transformations, multi-scale neighborhood aggregation, and community-sensitive attention mechanisms, and a modularity-directed objective is used to incentivize the structure-aware node embeddings to be shaped by latent community structures. The learned embeddings are refined in the second stage by a Multi-scale Graph Diffusion Transformer (MGDT) encoder that incorporates higher-order node interactions. According to the refined representations, a new prototype-based overlapping community detection mechanism is proposed, in which community prototypes can be initially set up by using K-means clustering and soft membership scores are calculated by using similarity-based assignment. The framework is trained with a multi-objective optimization strategy that jointly embeds cohesion, overlap regularization, entropy control, cluster balance, and prototype diversity. The experiments carried out on the heterogeneous citation network of the ACM show that the proposed framework can be used to identify the meaningful community structures. It has high clustering performance of a Silhouette Score of 0.8419, a Davies Bouldin Index of 0.5142 and high graph modularity. The findings also indicate that MACO-MGDT has a very good capability in capturing overlapping community membership especially on the node at an intersectional point. These results demonstrate the promise of the suggested method on scalable and interpretable community detection of complex heterogeneous networks.

N. Vinod, Neha Priyesh, Sreelakshmy A J et al. · 0 citations
Preprint Aug 2026

Interpretable Unsupervised Community Detection with LLM-Symbolized Structured Processes

Community detection is a fundamental task in graph analytics that aims to identify cohesive groups of entities with similar behaviors or interests. Classic objective-driven methods struggle with complex graph structures, while deep-learning approaches improve performance at the expense of interpretability and rely on labeled data and training. Large language models (LLMs), with strong reasoning capabilities and world knowledge, are promising for interpretable, label-free community detection. To leverage these strengths, we propose LUCID, an LLM-guided, interpretable, training-free, and unsupervised community detection method. Inspired by phase-transition kinetics in natural systems, where complex structures emerge through initialization, merging, refinement, and selection, LUCID is designed as a four-stage pipeline. Within this pipeline, the LLM induces formal rules that translate implicit knowledge into explicit and interpretable logical structures. Specifically, (1) the Local-View Community Initialization stage encodes local graph structures using k-ego contexts and unsupervised node roles; (2) the Multi-factor Community Merge stage uses LLM-induced rules to iteratively merge local communities; (3) the Multi-grain Community Refinement stage applies LLM-induced coarse-to-fine rules in parallel to reduce boundary noise; and (4) the Global-view Community Selection stage identifies high-quality communities based on topological compactness and boundary clarity. Extensive experiments on real-world datasets demonstrate that LUCID, as an unsupervised approach, achieves state-of-the-art performance and consistently outperforms leading unsupervised and semi-supervised baselines.

Aoting Zeng, Kai Wang, Jianwei Wang et al. · 0 citations
Jun 2026

Curvature-Guided Sheaf Diffusion for Unsupervised Community Detection on Heterophilic Graphs

Detecting communities in heterophilic graphs -- where connected nodes often belong to different classes -- is hard for unsupervised methods: classical modularity and spectral methods are feature agnostic, while deep graph-clustering methods rely on contrastive or generative machinery that is opaque. We propose Curvature-Guided Sheaf Diffusion (CGSD), a fully unsupervised community-detection algorithm that uses the discrete Forman--Ricci curvature of each edge as its single topological signal, propagated through every stage of an end-to-end pipeline. CGSD makes three concrete contributions: (i)~a curvature-gated sheaf-diffusion encoder that gates edge messages by $\sigma(\kappa_e)$ and is trained from three label-free structural losses (modularity, anti-collapse, curvature-weighted reconstruction); (ii)~a curvature-aware spectral clusterer (CSpec) that re-weights the $k$-NN affinity of the embedding by $\sigma(\alpha \kappa_{e^*})$ before Ng--Jordan--Weiss; and (iii)~a unified label-free evaluation against nine truly-unsupervised baselines. On five heterophilic benchmarks (Cora, Cornell, Texas, Wisconsin, Chameleon), CGSD wins outright on Wisconsin and Chameleon and is competitive on the remaining three against nine unsupervised baselines. The gain over the strongest baseline is driven by the clusterer, not the encoder: on the same embedding, CSpec improves mean NMI from $0.091$ with $K$-Means to $0.107$ ($+15\%$, paired $t$-test $p=0.008$). The mechanism is interpretable: intra-community and inter-community curvature distributions are visibly separated. Code is open-sourced at https://github.com/woodywff/cgsd.

Feifan Wang · 0 citations
Open access Jun 2026

ECBR: A Graph-Based Learning Framework for Dynamic Community Detection in Social Networks

Traditional dynamic community detection methods often struggle to simultaneously preserve local structural consistency, capture global topological relationships, and efficiently adapt to continuous graph updates in large-scale environments. To solve these limitations, this paper proposes a novel dynamic community detection framework called Embedded Clustering Boundary Refinement (ECBR). The proposed method integrates unsupervised GraphSAGE and Node2Vec embeddings to jointly capture local neighborhood aggregation patterns and global structural equivalence among nodes. The generated embeddings are fused through feature concatenation and z-score normalization to construct a unified latent representation space. Subsequently, Mini-Batch KMeans clustering is employed to efficiently generate the initial community structure while maintaining scalability for large-scale graphs. To further improve partition quality, ECBR introduces a boundary-aware refinement mechanism that identifies structurally ambiguous nodes using neighborhood consistency analysis and reassigns them according to embedding-space similarity. In addition, the framework incorporates an adaptive dynamic update strategy capable of distinguishing between major topological shifts and localized structural changes. Significant graph perturbations trigger complete model retraining, whereas minor modifications are handled through computationally efficient incremental updates on local subgraphs. Experimental evaluations were conducted on synthetic LFR benchmark networks and several real-world dynamic interaction datasets, including high school, workplace, and hospital contact networks. The results demonstrate that ECBR consistently outperforms several state-of-the-art methods, including QCA, DyPerm, DCDID, IncNSA, and DCDBFE, achieving better NMI and ARI scores across diverse network conditions. The experimental findings confirm that ECBR provides a scalable, robust, and highly effective solution for dynamic community detection in evolving large-scale social networks.

Asgarali Bouyer, Alireza Rouhi, Bahman Arasteh et al. · 0 citations