NetworKit
NetworKit is a growing open-source toolkit for large-scale network analysis. Its aim is to provide tools for the analysis of large networks in the size range from thousands to billions of edges. It implements efficient graph algorithms, many of them parallel to utilize multicore architectures.
Description
About The Project
NetworKit is an open-source toolkit for high-performance network analysis, designed to handle large networks ranging from thousands to billions of edges. Built with efficiency and scalability at its core, NetworKit implements parallel graph algorithms that leverage multicore architectures to compute standard measures of network analysis.
As both a production tool and a research testbed for algorithm engineering, NetworKit includes novel algorithms from recent publications alongside battle-tested implementations. The toolkit is available as a Python module with high-performance C++ algorithms exposed through Cython, combining Python's interactivity and rich ecosystem with C++'s computational efficiency.
Key Features
- Scalable: Analyze networks with billions of edges
- Fast: Parallel algorithms utilizing multicore architectures
- Comprehensive: Wide range of network analysis algorithms
- Interactive: Python interface with Jupyter notebook support
- Flexible: Available as Python module or standalone C++ library
- Research-ready: Includes state-of-the-art algorithms from recent publications
Getting Started
Installation
Python Module
For most users, NetworKit can be installed directly via package managers with no additional requirements other than Python 3.10+.
| Package Manager | Command |
|---|---|
| pip | pip install networkit |
| conda | conda install -c conda-forge networkit |
| brew | brew install networkit |
| spack | spack install py-networkit |
C++ Core Library Only
If you only need the C++ core without Python bindings:
| Package Manager | Command |
|---|---|
| conda | conda install -c conda-forge libnetworkit |
| brew | brew install libnetworkit |
| spack | spack install libnetworkit |
More platform-specific installation instructions can be found in our getting started guide.
Nightly builds
If you are interested in the most recent build of NetworKit, you can use the nightly repository on test.pypi.org.
Published packages are based on pushes to the master-branch.
| Package Manager | Command |
|---|---|
| pip | pip install -i https://test.pypi.org/simple/ networkit-nightly |
Usage
Here's a quick example showing how to generate a random hyperbolic graph with 100k nodes and detect communities:
from networkit.generators import HyperbolicGenerator
from networkit.community import detectCommunities
# Generate a random hyperbolic graph
g = (
HyperbolicGenerator(1e5)
.generate()
)
# Detect communities
detectCommunities(g, inspect=True)
Output:
PLM(balanced,pc,turbo) detected communities in 0.14577102661132812 [s]
solution properties:
------------------- -----------
# communities 4536
min community size 1
max community size 2790
avg. community size 22.0459
modularity 0.987243
------------------- -----------
More Examples
Compute PageRank to rank nodes by importance:
from networkit.centrality import PageRank
pr = (
PageRank(g)
.run()
)
top_nodes = pr.ranking()[:10]
Analyze graph structure with connected components:
from networkit.components import ConnectedComponents
cc = (
ConnectedComponents(g)
.run()
)
print(f"Components: {cc.numberOfComponents()}")
print(f"Largest: {max(cc.getComponentSizes().values())}")
For comprehensive examples and tutorials, explore our interactive notebooks, especially the NetworKit User Guide. You can try NetworKit directly in your browser using our Binder instance.
Building from Source
Prerequisites
Building from source requires:
- C++ Compiler: g++ (>= 10.0), clang++ (>= 11.0), or MSVC (>= 14.30)
- OpenMP: For parallelism (usually included with compiler)
- Python: 3.10 or higher with development libraries
- Debian/Ubuntu:
apt-get install python3-dev - RHEL/CentOS:
dnf install python3-devel - Windows: Official installer
- Debian/Ubuntu:
- CMake: Version 3.6 or higher
- Build System: Make or Ninja
Python Module
git clone https://github.com/networkit/networkit networkit
cd networkit
pip install cython numpy setuptools wheel
python setup.py build_ext [-jX]
pip install -e .
The -jX option specifies the number of threads for compilation (e.g., -j4 for 4 threads). If omitted, it uses all available CPU cores.
C++ Core Library
mkdir build && cd build
cmake ..
make -jX
sudo make install
Using NetworKit in Your C++ Project
After installation, include NetworKit headers:
#include <networkit/graph/Graph.hpp>
Compile your project:
g++ my_file.cpp -lnetworkit
Running Unit Tests
To build and run tests:
cmake -DNETWORKIT_BUILD_TESTS=ON ..
make
./networkit_tests --gtest_filter=CentralityGTest.testBetweennessCentrality
Building with Sanitizers
For debugging with address/leak sanitizers:
cmake -DNETWORKIT_WITH_SANITIZERS=leak ..
Documentation
The complete documentation is available online at networkit.github.io.
Contributing
We welcome contributions to NetworKit! Whether you're fixing bugs, adding features, or improving documentation, your help makes NetworKit better for everyone.
- Check our development guide for instructions
- Browse open issues or open a new one
- Fork the repository and create your feature branch
- Submit a pull request
For support, join our mailing list.
License
Distributed under the MIT License. We ask that you cite us if you use NetworKit in your research (see our technical report and publications page).
Contact
- Issues: Check our issues section for existing discussions or open a new issue
- Mailing List: Subscribe here to stay updated
Publications
NetworKit has been used in numerous research projects. Visit our publications page for a complete list of papers about NetworKit, algorithms implemented in NetworKit, and research using NetworKit.
Credits
NetworKit is developed by a dedicated team of researchers and contributors. View the full list of contributors on our credits page.
Reference papers
Mentions
- 1.Author(s): Ryan O. Connor, Noah Coleman, Darren Strash, Saurabh Ray, Deepak AjwaniPublished in 202610.1007/978-3-032-27242-3_8
- 2.Author(s): Lukas Berner, Felix L. Heitmann, Henning MeyerhenkePublished in 2025 Proceedings of the Conference on Applied and Computational Discrete Algorithms (ACDA) by Society for Industrial and Applied Mathematics in 2025, page: 237-25010.1137/1.9781611978759.18
- 3.Author(s): Fabian Brandt-Tumescheit, Frieda Gerharz, Henning MeyerhenkePublished in Studies in Computational Intelligence, Complex Networks & Their Applications XIII by Springer Nature Switzerland in 2025, page: 139-15110.1007/978-3-031-82439-5_12
- 4.Author(s): Michał Bryła, Rafał KasprzykPublished in Communications in Computer and Information Science, Artificial Intelligence and Machine Learning by Springer Nature Switzerland in 2025, page: 81-9510.1007/978-3-031-79086-7_8
- 5.Author(s): L. M. Brown, G. S. NelPublished in Lecture Notes in Computer Science, Dynamics of Information Systems by Springer Nature Switzerland in 2025, page: 229-25010.1007/978-3-031-81010-7_15
- 6.Author(s): Lukas Berner, Henning MeyerhenkePublished in Lecture Notes in Computer Science, Machine Learning and Knowledge Discovery in Databases. Research Track by Springer Nature Switzerland in 2024, page: 287-30210.1007/978-3-031-70365-2_17
- 7.Author(s): Eugenio Angriman, Patrick Bisenius, Elisabetta Bergamini, Henning MeyerhenkePublished in Massive Graph Analytics by Chapman and Hall/CRC in 2022, page: 161-19210.1201/9781003033707-10
- 8.Author(s): Sahar Yassine, Seifedine Kadry, Miguel-Ángel SiciliaPublished in Analysing Users' Interactions with Khan Academy Repositories by Springer International Publishing in 2021, page: 65-7810.1007/978-3-030-89166-4_8
- 9.Author(s): Alexander van der Grinten, Eugenio Angriman, Maria Predari, Henning MeyerhenkePublished in Proceedings of the 2021 SIAM International Conference on Data Mining (SDM) by Society for Industrial and Applied Mathematics in 2021, page: 136-14410.1137/1.9781611976700.16
- 10.Author(s): Eugenio Angriman, Ruben Becker, Gianlorenzo D'Angelo, Hugo Gilbert, Alexander van der Grinten, Henning MeyerhenkePublished in 2021 Proceedings of the Workshop on Algorithm Engineering and Experiments (ALENEX) by Society for Industrial and Applied Mathematics in 2021, page: 154-16810.1137/1.9781611976472.12
- 11.Author(s): Sahar Yassine, Seifedine Kadry, Miguel-Ángel SiciliaPublished in Analysing Users' Interactions with Khan Academy Repositories by Springer International Publishing in 2021, page: 57-6410.1007/978-3-030-89166-4_7
- 12.Author(s): Sahar Yassine, Seifedine Kadry, Miguel-Ángel SiciliaPublished in Analysing Users' Interactions with Khan Academy Repositories by Springer International Publishing in 2021, page: 31-3610.1007/978-3-030-89166-4_5
- 1.Author(s): Pranav Pamidighantam, Vairavan Murugappan, Suresh Subramanian, Eunice E. SantosPublished in 2025 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW) by IEEE in 2025, page: 265-27410.1109/ipdpsw66978.2025.00050
- 2.Author(s): Marco Minutoli, Reece Neff, Naw Safrin Sattar, Hao Lu, John Feo, Henning Mortveit, Anil Vullikanti, Dawen Xie, Mandy L Wilson, Gregor von Laszewski, Parantapa Bhattacharya, S M Ferdous, Ananth Kalyanaraman, Michela Becchi, Madhav Marathe, Mahantesh HalappanavarPublished in Proceedings of the 39th ACM International Conference on Supercomputing by ACM in 2025, page: 718-73310.1145/3721145.3730414
- 3.Author(s): Amir M. Mir, Mehdi Keshani, Sebastian ProkschPublished in Proceedings of the 21st International Conference on Mining Software Repositories by ACM in 2024, page: 457-46810.1145/3643991.3644897
- 4.Author(s): Eugenio Angriman, Fabian Brandt-Tumescheit, Leon Franke, Alexander van der Grinten, Henning MeyerhenkePublished in 2022 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW) by IEEE in 2022, page: 255-26410.1109/ipdpsw55747.2022.00055
- 5.Author(s): Maria Predari, Robert Kooij, Henning MeyerhenkePublished in 2022 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM) by IEEE in 2022, page: 1-810.1109/asonam55673.2022.10068613
- 6.Author(s): Zhen Su, Jürgen Kurths, Henning MeyerhenkePublished in 2022 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM) by IEEE in 2022, page: 9-1610.1109/asonam55673.2022.10068651
- 7.Author(s): Lucas Machi, Henry Carscadden, Chris Kuhlman, Dustin Machi, S. S. RaviPublished in EPiC Series in Computing by EasyChair , page: 80-6910.29007/2kx6
- 1.Author(s): Bruno Deprez, Toon Vanderschueren, Bart Baesens, Tim Verdonck, Wouter VerbekePublished in INFORMS Journal on Data Science by Institute for Operations Research and the Management Sciences (INFORMS) in 2026, page: 119-15410.1287/ijds.2024.0042
- 2.Author(s): Carlos G.O. Fernandes, Erneson A. Oliveira, Rilder S. Pires, João A. Monteiro Neto, J. Ernesto Pimentel Fh., José S. Andrade Jr., Vasco FurtadoPublished in PLOS One by Public Library of Science (PLoS) in 2025, page: e032438610.1371/journal.pone.0324386
- 3.Author(s): Zhiyang Xiao, Lingyu Fan, Zidong Yu, Xintao LiuPublished in Computational Urban Science by Springer Science and Business Media LLC in 202510.1007/s43762-025-00184-y
- 4.Author(s): Ranran Wang, Yin Zhang, Henning Meyerhenke, Zhiliang Feng, Sabita Maharjan, Yan ZhangPublished in IEEE Transactions on Services Computing by Institute of Electrical and Electronics Engineers (IEEE) in 2025, page: 2254-226610.1109/tsc.2025.3586094
- 5.Author(s): Georgios Panayiotou, Inga K. Wohlert, Miia Bask, Mikael Bask, Matteo Magnani, Ilkka Henrik MäkinenPublished in Scientific Reports by Springer Science and Business Media LLC in 202510.1038/s41598-025-15966-x
- 6.Author(s): J. Orestes Cerdeira, Fabio A. C. C. Chalub, Matheus HansenPublished in Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences by The Royal Society in 202510.1098/rspa.2024.0971
- 7.Author(s): Zhen Su, Jürgen Kurths, Henning MeyerhenkePublished in Journal of the Franklin Institute by Elsevier BV in 2025, page: 10740410.1016/j.jfranklin.2024.107404
- 8.Author(s): Soukaina Firmli, Dalila ChiadmiPublished in International journal of electrical and computer engineering systems by Faculty of Electrical Engineering, Computer Science and Information Technology Osijek in 2025, page: 19-3010.32985/ijeces.16.1.3
- 9.Author(s): Zhen Su, Yang Liu, Jürgen Kurths, Henning MeyerhenkePublished in Information Sciences by Elsevier BV in 2024, page: 12109610.1016/j.ins.2024.121096
- 10.Author(s): Wei Han, Siyu Bao, Jintao Liu, Yiran Wu, Liting Zeng, Tao Zhang, Ningmeng Chen, Kai Yao, Shunguo Fan, Aiping Huang, Yuanyuan Feng, Guiquan Zhang, Ruiyi Zhang, Hongjin Zhu, Tian Hua, Zhijie Liu, Lina Cao, Xingxu Huang, Suwen ZhaoPublished in Protein & Cell by Oxford University Press (OUP) in 2024, page: 283-29210.1093/procel/pwae050
- 11.Author(s): Louise Tarrade, Jean-Pierre Chevrot, Jean-Philippe MaguéPublished in PLOS Complex Systems by Public Library of Science (PLoS) in 2024, page: e000000510.1371/journal.pcsy.0000005
- 12.Author(s): Esteban Schab, Carla Casanova, Fabiana PiccoliPublished in Journal of Computer Science and Technology by Universidad Nacional de La Plata in 2024, page: e0310.24215/16666038.24.e03
- 13.Author(s): Chimi Wangmo, Lena WiesePublished in SN Computer Science by Springer Science and Business Media LLC in 202410.1007/s42979-024-03006-w
- 14.Author(s): Maria Predari, Lukas Berner, Robert Kooij, Henning MeyerhenkePublished in Social Network Analysis and Mining by Springer Science and Business Media LLC in 202310.1007/s13278-023-01137-1
- 15.Author(s): Falah Amro, Hemant PurohitPublished in Social Network Analysis and Mining by Springer Science and Business Media LLC in 202310.1007/s13278-023-01124-6
- 16.Author(s): Kai Klede, Leo Schwinn, Dario Zanca, Björn EskofierPublished in Proceedings of the AAAI Conference on Artificial Intelligence by Association for the Advancement of Artificial Intelligence (AAAI) in 2023, page: 8317-832410.1609/aaai.v37i7.26003
- 17.Author(s): Lienke Brown, Stephan NelPublished in South African Journal of Industrial Engineering by Stellenbosch University in 202310.7166/34-3-2960
- 18.Author(s): Eugenio Angriman, Michał Boroń, Henning MeyerhenkePublished in ACM Journal of Experimental Algorithmics by Association for Computing Machinery (ACM) in 2022, page: 1-4110.1145/3529228
- 19.Author(s): Alexander Grinten van der, Elisabetta Bergamini, Oded Green, David A. Bader, Henning MeyerhenkePublished in ACM Journal of Experimental Algorithmics by Association for Computing Machinery (ACM) in 2022, page: 1-1610.1145/3524615
- 20.Author(s): Pablo Lara-Martínez, Bibiana Obregón-Quintana, C. F. Reyes-Manzano, Irene López-Rodríguez, Lev Guzmán-VargasPublished in PLOS ONE by Public Library of Science (PLoS) in 2022, page: e027461710.1371/journal.pone.0274617
- 21.Author(s): Nahuel Almeira, Juan Ignacio Perotti, Andrés Chacoma, Orlando Vito BilloniPublished in Chaos, Solitons & Fractals by Elsevier BV in 2021, page: 11152910.1016/j.chaos.2021.111529
- 22.Author(s): Daniel Rivas-Barragan, Sarah Mubeen, Francesc Guim Bernat, Martin Hofmann-Apitius, Daniel Domingo-FernándezPublished in PLOS Computational Biology by Public Library of Science (PLoS) in 2020, page: e100846410.1371/journal.pcbi.1008464
- 23.Author(s): Jiaqi Liang, Linjing Li, Daniel ZengPublished in PLOS ONE by Public Library of Science (PLoS) in 2018, page: e020220210.1371/journal.pone.0202202
- 24.Author(s): Seung-Hee Bae, Daniel Halperin, Jevin D. West, Martin Rosvall, Bill HowePublished in ACM Transactions on Knowledge Discovery from Data by Association for Computing Machinery (ACM) in 2017, page: 1-3010.1145/2992785
- 25.Author(s): Jeremy Kepner, David Bader, Aydın Buluç, John Gilbert, Timothy Mattson, Henning MeyerhenkePublished in Procedia Computer Science by Elsevier BV in 2015, page: 2453-246210.1016/j.procs.2015.05.353
- 1.Author(s): Natkamon Tovanich, Stefania Marcassa, Stefan Kitzler, Christos Makridis, julien pratPublished by Elsevier BV in 202510.2139/ssrn.5380164
- 2.Author(s): Fabian Brandt-Tumescheit, Frieda Gerharz, Henning MeyerhenkePublished by arXiv in 202410.48550/arxiv.2410.09965
- 3.Author(s): Subhajit Sahu, Kishore Kothapalli, Dip Sankar BanerjeePublished by Elsevier BV in 202410.2139/ssrn.4872978
- 4.Author(s): Subhajit Sahu, Kishore Kothapalli, Dip Sankar BanerjeePublished by Elsevier BV in 202410.2139/ssrn.4840874
- 5.Author(s): Janani Durairaj, Yusuf Adeshina, Zhonglin Cao, Xuejin Zhang, Vladas Oleinikovas, Thomas Duignan, Zachary McClure, Xavier Robin, Gabriel Studer, Daniel Kovtun, Emanuele Rossi, Guoqing Zhou, Srimukh Veccham, Clemens Isert, Yuxing Peng, Prabindh Sundareson, Mehmet Akdel, Gabriele Corso, Hannes Stärk, Gerardo Tauriello, Zachary Carpenter, Michael Bronstein, Emine Kucukbenli, Torsten Schwede, Luca NaefPublished by openRxiv in 202410.1101/2024.07.17.603955
- 6.Author(s): David Burth Kurka, Alan Godoy, Fernando J. Von ZubenPublished by arXiv in 201510.48550/arxiv.1504.05655
- 7.Author(s): Daniel Hoske, Dimitar Lukarski, Henning Meyerhenke, Michael WegnerPublished by Karlsruhe Institute of Technology in 201510.13140/2.1.4184.9128
- 8.Author(s): Houwu Chen, Jiwu ShuPublished by arXiv in 201510.48550/arxiv.1501.06238
Helmholtz Program-oriented Funding IV
Related projects
Core Informatics
A Helmholtz Pilot Program