Faster Local Motif Clustering via Maximum Flows

Authors Adil Chhabra , Marcelo Fonseca Faraj , Christian Schulz

Thumbnail PDF


  • Filesize: 1.03 MB
  • 16 pages

Document Identifiers

Author Details

Adil Chhabra
  • Heidelberg University, Germany
Marcelo Fonseca Faraj
  • Heidelberg University, Germany
Christian Schulz
  • Heidelberg University, Germany

Cite AsGet BibTex

Adil Chhabra, Marcelo Fonseca Faraj, and Christian Schulz. Faster Local Motif Clustering via Maximum Flows. In 31st Annual European Symposium on Algorithms (ESA 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 274, pp. 34:1-34:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


Local clustering aims to identify a cluster within a given graph that includes a designated seed node or a significant portion of a group of seed nodes. This cluster should be well-characterized, i.e., it has a high number of internal edges and a low number of external edges. In this work, we propose SOCIAL, a novel algorithm for local motif clustering which optimizes for motif conductance based on a local hypergraph model representation of the problem and an adapted version of the max-flow quotient-cut improvement algorithm (MQI). In our experiments with the triangle motif, SOCIAL produces local clusters with an average motif conductance 1.7% lower than the state-of-the-art, while being up to multiple orders of magnitude faster.

Subject Classification

ACM Subject Classification
  • Theory of computation → Design and analysis of algorithms
  • local motif clustering
  • motif conductance
  • maximum flows
  • max-flow quotient-cut improvement


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Reid Andersen, Fan Chung, and Kevin Lang. Local graph partitioning using pagerank vectors. In FOCS, pages 475-486, 2006. URL:
  2. Reid Andersen and Kevin J. Lang. An algorithm for improving graph partitions. In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, pages 651-660. SIAM, 2008. URL:
  3. Austin R. Benson, David F. Gleich, and Jure Leskovec. Tensor spectral clustering for partitioning higher-order network structures. In Proceedings of the 2015 SIAM International Conference on Data Mining, pages 118-126. SIAM, 2015. URL:
  4. Austin R. Benson, David F. Gleich, and Jure Leskovec. Higher-order organization of complex networks. Science, 353(6295):163-166, 2016. URL:
  5. Ulrik Brandes, Daniel Delling, Marco Gaertler, Robert Görke, Martin Hoefer, Zoran Nikoloski, and Dorothea Wagner. On modularity clustering. IEEE Trans. Knowl. Data Eng., 20(2):172-188, 2008. URL:
  6. Adil Chhabra, Marcelo Fonseca Faraj, and Christian Schulz. Faster local motif clustering via maximum flows. CoRR, abs/2301.07145, 2023. URL:
  7. Adil Chhabra, Marcelo Fonseca Faraj, and Christian Schulz. Local motif clustering via (hyper)graph partitioning. In Symposium on Algorithm Engineering and Experiments (ALENEX 23), January 22-23, 2023. SIAM, 2023. Google Scholar
  8. Norishige Chiba and Takao Nishizeki. Arboricity and subgraph listing algorithms. SIAM J. Comp., 14(1):210-223, 1985. URL:
  9. Fan Chung and Olivia Simpson. Solving linear systems with boundary conditions using heat kernel pagerank. In Intl. Workshop on Algorithms and Models for the Web-Graph, pages 203-219. Springer, 2013. URL:
  10. Jonathan Cohen. Trusses: Cohesive subgraphs for social network analysis. National security agency Tech. report, 16(3.1), 2008. URL:
  11. Wanyun Cui, Yanghua Xiao, Haixun Wang, and Wei Wang. Local search of communities in large graphs. In ACM SIGMOD Intl. Conf. on Management of data, pages 991-1002, 2014. URL:
  12. Alessandro Epasto, Jon Feldman, Silvio Lattanzi, Stefano Leonardi, and Vahab Mirrokni. Reduce and aggregate: similarity ranking in multi-categorical bipartite graphs. In WWW, pages 349-360, 2014. URL:
  13. Lester Randolph Ford and Delbert Ray Fulkerson. Maximal flow through a network. Canadian Journal of Mathematics, 8:399-404, 1956. URL:
  14. Kimon Fountoulakis, Pan Li, and Shenghao Yang. Local hyper-flow diffusion. In Marc'Aurelio Ranzato, Alina Beygelzimer, Yann N. Dauphin, Percy Liang, and Jennifer Wortman Vaughan, editors, Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, virtual, pages 27683-27694, 2021. URL:
  15. Kimon Fountoulakis, Meng Liu, David F. Gleich, and Michael W. Mahoney. Flow-based algorithms for improving clusters: A unifying framework, software, and performance. SIAM Rev., 65(1):59-143, 2023. URL:
  16. Andrew V. Goldberg and Robert Endre Tarjan. A new approach to the maximum-flow problem. J. ACM, 35(4):921-940, 1988. URL:
  17. Lars Gottesbüren, Tobias Heuer, Peter Sanders, and Sebastian Schlag. Scalable shared-memory hypergraph partitioning. In Proceedings of the Symposium on Algorithm Engineering and Experiments, ALENEX, pages 16-30. SIAM, 2021. URL:
  18. Lars Gottesbüren, Tobias Heuer, Peter Sanders, Christian Schulz, and Daniel Seemaier. Deep multilevel graph partitioning. In 29th Annual European Symposium on Algorithms, ESA, volume 204 of LIPIcs, pages 48:1-48:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. URL:
  19. Xin Huang, Hong Cheng, Lu Qin, Wentao Tian, and Jeffrey Xu Yu. Querying k-truss community in large and dynamic graphs. In ACM SIGMOD, pages 1311-1322, 2014. URL:
  20. Rania Ibrahim and David F. Gleich. Local hypergraph clustering using capacity releasing diffusion. CoRR, abs/2003.04213, 2020. URL:
  21. Lucas G. S. Jeub, Prakash Balachandran, Mason A. Porter, Peter J. Mucha, and Michael W. Mahoney. Think locally, act locally: Detection of small, medium-sized, and large communities in large networks. Physical Review E, 91(1):012821, 2015. URL:
  22. Ravi Kannan, Santosh Vempala, and Adrian Vetta. On clusterings: Good, bad and spectral. JACM, 51(3):497-515, 2004. URL:
  23. Raphael Kimmig, Henning Meyerhenke, and Darren Strash. Shared memory parallel subgraph enumeration. In 2017 IEEE International Parallel and Distributed Processing Symposium Workshops, IPDPS Workshops, pages 519-529. IEEE Computer Society, 2017. URL:
  24. Kyle Kloster and David F. Gleich. Heat kernel based community detection. In The 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD, pages 1386-1395. ACM, 2014. URL:
  25. Christine Klymko, David F. Gleich, and Tamara G. Kolda. Using triangles to improve community detection in directed networks. CoRR, abs/1404.5874, 2014. URL:
  26. Kevin J. Lang and Satish Rao. A flow-based method for improving the expansion or conductance of graph cuts. In Integer Programming and Combinatorial Optimization, 10th International IPCO, volume 3064 of LNCS, pages 325-337. Springer, 2004. URL:
  27. Eugene L. Lawler. Cutsets and partitions of hypergraphs. Networks, 3(3):275-285, 1973. URL:
  28. Jure Leskovec and Andrej Krevl. SNAP Datasets: Stanford large network dataset collection., June 2014.
  29. Jure Leskovec, Kevin J. Lang, Anirban Dasgupta, and Michael W. Mahoney. Community structure in large networks: Natural cluster sizes and the absence of large well-defined clusters. Internet Math., 6(1):29-123, 2009. URL:
  30. Yixuan Li, Kun He, David Bindel, and John E. Hopcroft. Uncovering the small community structure in large networks: A local spectral approach. In Proceedings of the 24th International Conference on World Wide Web, WWW, pages 658-668. ACM, 2015. URL:
  31. Meng Liu, Nate Veldt, Haoyu Song, Pan Li, and David F. Gleich. Strongly local hypergraph diffusions for clustering and semi-supervised learning. In WWW '21: The Web Conference, pages 2092-2103. ACM / IW3C2, 2021. URL:
  32. Michael W. Mahoney, Lorenzo Orecchia, and Nisheeth K. Vishnoi. A local spectral method for graphs: with applications to improving graph partitions and exploring data graphs locally. J. Mach. Learn. Res., 13:2339-2365, 2012. URL:
  33. Tao Meng, Lijun Cai, Tingqin He, Lei Chen, and Ziyun Deng. Local higher-order community detection based on fuzzy membership functions. IEEE Access, 7:128510-128525, 2019. URL:
  34. Mrudula Murali, Katerina Potika, and Chris Pollett. Online local communities with motifs. In 2020 Second Intl. Conf. on Transdisciplinary AI (TransAI), pages 59-66. IEEE Computer Society, September 2020. URL:
  35. Lorenzo Orecchia and Zeyuan Allen Zhu. Flow-based algorithms for local graph clustering. In SODA, pages 1267-1286. SIAM, 2014. URL:
  36. Nataša Pržulj. Biological network comparison using graphlet degree distribution. Bioinformatics, 23(2):e177-e183, 2007. URL:
  37. Ronald C. Read and Derek G. Corneil. The graph isomorphism disease. J. Graph Theory, 1(4):339-363, 1977. URL:
  38. Karl Rohe and Tai Qin. The blessing of transitivity in sparse and stochastic networks. arXiv preprint, 2013. URL:
  39. Peter Sanders and Christian Schulz. Engineering multilevel graph partitioning algorithms. In Algorithms - ESA 2011 - 19th Annual European Symposium, volume 6942 of LNCS, pages 469-480. Springer, 2011. URL:
  40. Sebastian Schlag, Vitali Henne, Tobias Heuer, Henning Meyerhenke, Peter Sanders, and Christian Schulz. k-way hypergraph partitioning via n-level recursive bisection. In Proceedings of the Workshop on Algorithm Engineering and Experiments, ALENEX, pages 53-67. SIAM, 2016. URL:
  41. Ronghua Shang, Weitong Zhang, Jingwen Zhang, Jie Feng, and Licheng Jiao. Local community detection based on higher-order structure and edge information. Physica A: Statistical Mechanics and its Applications, 587:126513, 2022. URL:
  42. Mauro Sozio and Aristides Gionis. The community-search problem and how to plan a successful cocktail party. In Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 939-948. ACM, 2010. URL:
  43. Daniel A. Spielman and Shang-Hua Teng. A local clustering algorithm for massive graphs and its application to nearly linear time graph partitioning. SIAM J. Comput., 42(1):1-26, 2013. URL:
  44. Charalampos E. Tsourakakis, Jakub Pachocki, and Michael Mitzenmacher. Scalable motif-aware graph clustering. In Proceedings of the 26th International Conference on World Wide Web, WWW, pages 1451-1460. ACM, 2017. URL:
  45. Nate Veldt, Austin R. Benson, and Jon M. Kleinberg. Minimizing localized ratio cut objectives in hypergraphs. In KDD '20: The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 1708-1718. ACM, 2020. URL:
  46. Nate Veldt, Austin R. Benson, and Jon M. Kleinberg. Hypergraph cuts with general splitting functions. SIAM Rev., 64(3):650-685, 2022. URL:
  47. Konstantin Voevodski, Shang-Hua Teng, and Yu Xia. Spectral affinity in protein networks. BMC systems biology, 3(1):1-13, 2009. URL:
  48. Dorothea Wagner and Frank Wagner. Between min cut and graph bisection. In Mathematical Foundations of Computer Science 1993, International Symposium, MFCS, volume 711 of LNCS, pages 744-750. Springer, 1993. URL:
  49. Hao Yin, Austin R. Benson, Jure Leskovec, and David F. Gleich. Local higher-order graph clustering. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 555-564. ACM, 2017. URL:
  50. Yunlei Zhang, Bin Wu, Yu Liu, and Jinna Lv. Local community detection based on network motifs. Tsinghua Science and Technology, 24(6):716-727, 2019. URL:
  51. Dawei Zhou, Si Zhang, Mehmet Yigit Yildirim, Scott Alcorn, Hanghang Tong, Hasan Davulcu, and Jingrui He. High-order structure exploration on massive graphs: A local graph clustering perspective. ACM Trans. Knowl. Discov. Data, 15(2):18:1-18:26, 2021. URL: