Welcome to pygmtools documentation!

PyPi version PyPI pyversions Documentation Status GitHub stars

pygmtools provides graph matching solvers in Python and is easily accessible via:

pip install pygmtools


By default the solvers are executed on the numpy backend, and the required packages will be automatically downloaded.

For advanced and professional users, pytorch/paddle/jittor backends are also available if you have installed and configured the corresponding runtime. The pytorch/paddle/jittor backends exploit the underlying GPU-acceleration feature, and also support integrating graph matching modules into your deep learning pipeline.


To highlight, pygmtools has the following features:

  • Support various backends, including numpy which is universally accessible, and some state-of-the-art deep learning architectures with GPU-support: pytorch/paddle/jittor. The support of the following backends are also planned: tensorflow, mindspore;

  • Support various solvers, including traditional combinatorial solvers and novel deep learning-based solvers;

  • Deep learning friendly, the operations are designed to best preserve the gradient during computation and batched operations support for the best performance.


pygmtools is also featured with standard data interface of several graph matching benchmarks. We also maintain a repository containing non-trivial implementation of deep graph matching models, please check out ThinkMatch if you are interested!