pyt-team / TopoModelX

Topological Deep Learning
MIT License
219 stars 79 forks source link
cell-complex-networks cell-complex-neural-networks cell-neural-networks cellular-message-passing cw-complex cw-networks cxn graph-neural-networks higher-order-message-passing higher-order-models higher-order-networks hypergraph-learning hypergraph-neural-networks simplicial-message-passing simplicial-neural-networks tensor-diagrams topological-data-analysis topological-deep-learning topological-message-passing topological-neural-networks

Building Topological Neural Networks for Topological Deep Learning

Contributing to TMXReferences

[![Test Codebase](https://github.com/pyt-team/torch_topo/actions/workflows/test_codebase.yml/badge.svg)](https://github.com/pyt-team/torch_topo/actions/workflows/test_codebase.yml) [![Test Tutorials](https://github.com/pyt-team/torch_topo/actions/workflows/test_tutorials.yml/badge.svg)](https://github.com/pyt-team/torch_topo/actions/workflows/test_tutorials.yml) [![Lint](https://github.com/pyt-team/torch_topo/actions/workflows/lint.yml/badge.svg)](https://github.com/pyt-team/torch_topo/actions/workflows/lint.yml) [![Codecov](https://codecov.io/gh/pyt-team/TopoModelX/branch/main/graph/badge.svg)](https://app.codecov.io/gh/pyt-team/TopoModelX) [![Docs](https://img.shields.io/badge/docs-website-brightgreen)](https://pyt-team.github.io/topomodelx/index.html) [![Python](https://img.shields.io/badge/python-3.10+-blue?logo=python)](https://www.python.org/) [![license](https://badgen.net/github/license/pyt-team/TopoNetX?color=green)](https://github.com/pyt-team/TopoNetX/blob/main/LICENSE) [![slack](https://img.shields.io/badge/chat-on%20slack-purple?logo=slack)](https://join.slack.com/t/pyt-teamworkspace/shared_invite/zt-2k63sv99s-jbFMLtwzUCc8nt3sIRWjEw) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7958513.svg)](https://doi.org/10.5281/zenodo.7958513)

tnns_network_with_layers

TopoModelX (TMX) is a Python module for topological deep learning. It offers simple and efficient tools to implement topological neural networks for science and engineering.

TMX's development follows the topological deep learning (TDL) blue print laid out in:

TMX can reproduce and extend the topological neural networks (TNNs) surveyed in:

See our graphical literature review with message-passing equations available at https://github.com/awesome-tnns/awesome-tnns.

Note: TMX is still under development.

🦾 Contributing to TMX

To develop tmx on your machine, here are some tips.

First, we recommend using Python 3.11.3, which is the python version used to run the unit-tests.

For example, create a conda environment:

   conda create -n tmx python=3.11.3
   conda activate tmx

Then:

  1. Clone a copy of tmx from source:

    git clone git@github.com:pyt-team/TopoModelX.git
    cd TopoModelX
  2. Install tmx in editable mode:

    pip install -e '.[all]'

    Notes:

    • Requires pip >= 21.3. Refer: PEP 660.
    • On Windows, use pip install -e .[all] instead (without quotes around [all]).
  3. Install torch, torch-scatter, torch-sparse with or without CUDA depending on your needs.

      pip install torch==2.0.1 --extra-index-url https://download.pytorch.org/whl/${CUDA}
      pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.0.1+${CUDA}.html
      pip install torch-cluster -f https://data.pyg.org/whl/torch-2.0.0+${CUDA}.html

    where ${CUDA} should be replaced by either cpu, cu102, cu113, or cu115 depending on your PyTorch installation (torch.version.cuda).

  4. Ensure that you have a working tmx installation by running the entire test suite with

    pytest

    In case an error occurs, please first check if all sub-packages (torch-scatter, torch-sparse, torch-cluster and torch-spline-conv) are on its latest reported version.

  5. Install pre-commit hooks:

    pre-commit install

🔍 References

To learn more about the topological deep learning blueprint:

Partially funded by the European Union (ERC, HIGH-HOPeS, 101039827). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.

Partially funded by the National Science Foundation (DMS-2134231, DMS-2134241).