Skip to main content

Representation Learning on Topological Domains

Project description

Representation Learning on Topological Domains

Main FeaturesInstalling TopoEmbedXGetting StartedReferences

Test Lint Codecov Docs Python license slack

DOI

topoembedx

Many natural systems as diverse as social networks and proteins are characterized by relational structure. This is the structure of interactions between components in the system, such as social interactions between individuals or electrostatic interactions between atoms.

How can we conveniently represent data defined on such relational systems?

TopoEmbedX (TEX) is a package for representation learning on topological domains, the mathematical structures of relational systems. TopoEmbedX is a part of TopoX.

🛠️ Main Features

Support of higher order representation learning algorithms such as:

  • DeepCell,
  • Cell2Vec,
  • Higher Order Laplacian Eigenmaps, and
  • Higher Order Geometric Laplacian Eigenmaps

for the topological domains supported in TopoNetX.

🤖 Installing TopoEmbedX

TopoEmbedX is available on PyPI and can be installed using pip.

pip install "pygsp @ git+https://github.com/epfl-lts2/pygsp@643b1c448559da8c7dbaed7537a9fd819183c569"
pip install "karateclub @ git+https://github.com/benedekrozemberczki/karateclub@cb46a91df8dcbeb2570debcf6a9d0c518107a2de"
pip install topoembedx

The library depends on pygsp and karateclub, which did not receive updates on PyPI for a long time. You have to manually install the latest versions from GitHub for up-to-date Python and NetworkX compatibility.

🦾 Getting Started

import topoembedx as tex
import toponetx as tnx

# create a cell complex object with a few cells
cc = tnx.CellComplex([[1, 2, 3, 4], [3, 4, 5, 6, 7, 8]], ranks=2)

# create a model
model = tex.Cell2Vec()

# fit the model
model.fit(cc, neighborhood_type="adj", neighborhood_dim={"rank": 1, "via_rank": -1})
# here neighborhood_dim={"rank": 1, "via_rank": -1} specifies the dimension for
# which the cell embeddings are going to be computed.
# rank=1 means that the embeddings will be computed for the first dimension.
# The integer 'via_rank' is ignored and only considered
# when the input complex is a combinatorial complex or colored hypergraph.


# get the embeddings:
embeddings = model.get_embedding()

🧑‍💻 Install from source

To install the latest version from source, follow these steps:

  1. Clone a copy of TopoEmbedX from source:
git clone https://github.com/pyt-team/TopoEmbedX
cd TopoEmbedX
  1. Install a recent version of pygsp and karateclub using a package manager of your choice, e.g., pip:
pip install "pygsp @ git+https://github.com/epfl-lts2/pygsp@643b1c448559da8c7dbaed7537a9fd819183c569"
pip install "karateclub @ git+https://github.com/benedekrozemberczki/karateclub@cb46a91df8dcbeb2570debcf6a9d0c518107a2de"
  1. Install TopoEmbedX in editable mode with development dependencies:
pip install -e . --group dev
  1. Install pre-commit hooks:
pre-commit install

🔍 References

To learn more about topological representation learning.

  • Mustafa Hajij, Ghada Zamzmi, Theodore Papamarkou, Nina Miolane, Aldo Guzmán-Sáenz, Karthikeyan Natesan Ramamurthy, Tolga Birdal, Tamal K. Dey, Soham Mukherjee, Shreyas N. Samaga, Neal Livesay, Robin Walters, Paul Rosen, Michael T. Schaub. Topological Deep Learning: Going Beyond Graph Data.
@misc{hajij2023topological,
      title={Topological Deep Learning: Going Beyond Graph Data},
      author={Mustafa Hajij and Ghada Zamzmi and Theodore Papamarkou and Nina Miolane and Aldo Guzmán-Sáenz and Karthikeyan Natesan Ramamurthy and Tolga Birdal and Tamal K. Dey and Soham Mukherjee and Shreyas N. Samaga and Neal Livesay and Robin Walters and Paul Rosen and Michael T. Schaub},
      year={2023},
      eprint={2206.00606},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Figure from:

@misc{papillon2023architectures,
      title={Architectures of Topological Deep Learning: A Survey on Topological Neural Networks},
      author={Mathilde Papillon and Sophia Sanborn and Mustafa Hajij and Nina Miolane},
      year={2023},
      eprint={2304.10031},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Funding

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topoembedx-0.1.0.tar.gz (393.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topoembedx-0.1.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file topoembedx-0.1.0.tar.gz.

File metadata

  • Download URL: topoembedx-0.1.0.tar.gz
  • Upload date:
  • Size: 393.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for topoembedx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2897b0d3c99e4e3ae1d5770c657aafe139b453f09f3f40a4e7734678921d655e
MD5 43d91cec952858ed2fd3ab964aa281d9
BLAKE2b-256 6e55eedd47b357b8cf0a83739f22cff8c3239aed8139c982c2c4ca664b2393c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for topoembedx-0.1.0.tar.gz:

Publisher: deploy.yml on pyt-team/TopoEmbedX

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file topoembedx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: topoembedx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for topoembedx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0beb730a09787e7817a2df336236183f42c9ae0155fc7274674c13bd931365
MD5 f38a0a2d1a57ed0beb6b4a647e8ecd8c
BLAKE2b-256 e150d1eccc148ae736e47061485b29823e5adb0ab9ed2204b780ec0c88008a65

See more details on using hashes here.

Provenance

The following attestation bundles were made for topoembedx-0.1.0-py3-none-any.whl:

Publisher: deploy.yml on pyt-team/TopoEmbedX

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page