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.9+.
| 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.9 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): Fabian Brandt-Tumescheit, Frieda Gerharz, Henning MeyerhenkePublished in 202510.1007/978-3-031-82439-5_12
- 3.Author(s): Michał Bryła, Rafał KasprzykPublished in 202510.1007/978-3-031-79086-7_8
- 4.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
- 5.Author(s): L. M. Brown, G. S. NelPublished in 202510.1007/978-3-031-81010-7_15
- 6.Author(s): Lukas Berner, Henning MeyerhenkePublished in 202410.1007/978-3-031-70365-2_17
- 7.Author(s): Eugenio Angriman, Patrick Bisenius, Elisabetta Bergamini, Henning MeyerhenkePublished in 202210.1201/9781003033707-10
- 8.Author(s): Sahar Yassine, Seifedine Kadry, Miguel-Ángel SiciliaPublished in 202110.1007/978-3-030-89166-4_7
- 9.Author(s): Sahar Yassine, Seifedine Kadry, Miguel-Ángel SiciliaPublished in 202110.1007/978-3-030-89166-4_8
- 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 202110.1007/978-3-030-89166-4_5
- 1.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
- 2.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
- 3.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
- 1.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 202510.1371/journal.pone.0324386
- 2.Author(s): Zhiyang Xiao, Lingyu Fan, Zidong Yu, Xintao LiuPublished in 202510.1007/s43762-025-00184-y
- 3.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 202510.1145/3721145.3730414
- 4.Author(s): Bruno Deprez, Toon Vanderschueren, Bart Baesens, Tim Verdonck, Wouter VerbekePublished in 202510.1287/ijds.2024.0042
- 5.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
- 6.Author(s): Georgios Panayiotou, Inga K. Wohlert, Miia Bask, Mikael Bask, Matteo Magnani, Ilkka Henrik MäkinenPublished in 202510.1038/s41598-025-15966-x
- 7.Author(s): Pranav Pamidighantam, Vairavan Murugappan, Suresh Subramanian, Eunice E. SantosPublished in 202510.1109/ipdpsw66978.2025.00050
- 8.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
- 9.Author(s): Soukaina Firmli, Dalila ChiadmiPublished in 202510.32985/ijeces.16.1.3
- 10.Author(s): J. Orestes Cerdeira, Fabio A. C. C. Chalub, Matheus HansenPublished in 202510.1098/rspa.2024.0971
- 11.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
- 12.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 202410.1093/procel/pwae050
- 13.Author(s): Louise Tarrade, Jean-Pierre Chevrot, Jean-Philippe MaguéPublished in 202410.1371/journal.pcsy.0000005
- 14.Author(s): Esteban Schab, Carla Casanova, Fabiana PiccoliPublished in 202410.24215/16666038.24.e03
- 15.Author(s): Chimi Wangmo, Lena WiesePublished in 202410.1007/s42979-024-03006-w
- 16.Author(s): Amir M. Mir, Mehdi Keshani, Sebastian ProkschPublished in 202410.1145/3643991.3644897
- 17.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
- 18.Author(s): Falah Amro, Hemant PurohitPublished in 202310.1007/s13278-023-01124-6
- 19.Author(s): Kai Klede, Leo Schwinn, Dario Zanca, Björn EskofierPublished in 202310.1609/aaai.v37i7.26003
- 20.Author(s): Lienke Brown, Stephan NelPublished in 202310.7166/34-3-2960
- 21.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
- 22.Author(s): Pablo Lara-Martínez, Bibiana Obregón-Quintana, C. F. Reyes-Manzano, Irene López-Rodríguez, Lev Guzmán-VargasPublished in 202210.1371/journal.pone.0274617
- 23.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
- 24.Author(s): Lucas Machi, Henry Carscadden, Chris Kuhlman, Dustin Machi, S. S. RaviPublished in 202110.29007/2kx6
- 25.Author(s): Daniel Rivas-Barragan, Sarah Mubeen, Francesc Guim Bernat, Martin Hofmann-Apitius, Daniel Domingo-FernándezPublished in 202010.1371/journal.pcbi.1008464
- 26.Author(s): Jiaqi Liang, Linjing Li, Daniel ZengPublished in 201810.1371/journal.pone.0202202
- 27.Author(s): Seung-Hee Bae, Daniel Halperin, Jevin D. West, Martin Rosvall, Bill HowePublished in 201710.1145/2992785
- 28.Author(s): Jeremy Kepner, David Bader, Aydın Buluç, John Gilbert, Timothy Mattson, Henning MeyerhenkePublished in 201510.1016/j.procs.2015.05.353
- 1.Author(s): Natkamon Tovanich, Stefania Marcassa, Stefan Kitzler, Christos Makridis, julien pratPublished in 202510.2139/ssrn.5380164
- 2.Author(s): Subhajit Sahu, Kishore Kothapalli, Dip Sankar BanerjeePublished in 202410.2139/ssrn.4872978
- 3.Author(s): Subhajit Sahu, Kishore Kothapalli, Dip Sankar BanerjeePublished in 202410.2139/ssrn.4840874
- 4.Author(s): Fabian Brandt-Tumescheit, Frieda Gerharz, Henning MeyerhenkePublished by arXiv in 202410.48550/arxiv.2410.09965
- 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 in 202410.1101/2024.07.17.603955
- 6.Author(s): Nahuel Almeira, Juan Ignacio Perotti, Andrés Chacoma, Orlando Vito BilloniPublished in 202110.1016/j.chaos.2021.111529
- 7.Author(s): Alexander van der Grinten, Eugenio Angriman, Maria Predari, Henning MeyerhenkePublished in 202110.1137/1.9781611976700.16
- 8.Author(s): Kurka, David Burth, Godoy, Alan, Von Zuben, Fernando J.Published in 201510.48550/arxiv.1504.05655
- 9.Author(s): Chen, Houwu, Shu, JiwuPublished in 201510.48550/arxiv.1501.06238
- 10.Author(s): Hoske, Daniel, Lukarski, Dimitar, Meyerhenke, Henning, Wegner, MichaelPublished in 201510.13140/2.1.4184.9128
Helmholtz Program-oriented Funding IV
Related projects
Core Informatics
A Helmholtz Pilot Program