Representation Learning on Topological Domains
Project description
Representation Learning on Topological Domains
Main Features • Installing TopoEmbedX • Getting Started • References
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.
🛠️ 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@a3412ce7696c02c8a55439e89d0c9ab8ae863269"
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:
- Clone a copy of
TopoEmbedX
from source:
git clone https://github.com/pyt-team/TopoEmbedX
cd TopoEmbedX
- If you have already cloned
TopoEmbedX
from source, update it:
git pull
- Install a recent version of
pygsp
andkarateclub
:
pip install "pygsp @ git+https://github.com/epfl-lts2/pygsp@a3412ce7696c02c8a55439e89d0c9ab8ae863269"
pip install "karateclub @ git+https://github.com/benedekrozemberczki/karateclub@cb46a91df8dcbeb2570debcf6a9d0c518107a2de"
- Install
TopoEmbedX
in editable mode:
pip install -e '.[all]'
- 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:
- Mathilde Papillon, Sophia Sanborn, Mustafa Hajij, Nina Miolane. Architectures of Topological Deep Learning: A Survey on Topological Neural Networks.
@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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file topoembedx-0.0.2.dev131.tar.gz
.
File metadata
- Download URL: topoembedx-0.0.2.dev131.tar.gz
- Upload date:
- Size: 393.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b80cadaef1bd84e6799e97eb7e95524b0c97de8c7b69f65d8b0c91d58db6f7ca |
|
MD5 | 1849ce7c45627e95e8823b699d4bfe91 |
|
BLAKE2b-256 | 2ef0e0c6a85f609bc0cd19cc92c651f0881b06d76f4a5339d13adb814b7569ce |
File details
Details for the file TopoEmbedX-0.0.2.dev131-py3-none-any.whl
.
File metadata
- Download URL: TopoEmbedX-0.0.2.dev131-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58bd277c981034efda7680be0b8b7dd5f5234c8887d553ce1632201c77a82643 |
|
MD5 | 5939f0107756d538c4e361c9d67e8eed |
|
BLAKE2b-256 | df81644982390810fb21557d63cae71194e05fdb6ec24200bf1f6a58f6ba7a50 |