A package for working with higher-order datasets like manifold triangulations.
Project description
MANTRA: The Manifold Triangulations Assemblage
MANTRA is a dataset consisting of combinatorial triangulations of manifolds. It can be used to create novel algorithms in topological deep learning or debug existing ones. See our ICLR 2025 paper for more details and our benchmarks repository for additional code to reproduce all experiments.
Please use the following citation for our work:
@inproceedings{Ballester25a,
title = {{MANTRA}: {T}he {M}anifold {T}riangulations {A}ssemblage},
author = {Rubén Ballester and Ernst Röell and Daniel Bīn Schmid and Mathieu Alain and Sergio Escalera and Carles Casacuberta and Bastian Rieck},
year = 2025,
booktitle = {International Conference on Learning Representations},
url = {https://openreview.net/forum?id=X6y5CC44HM},
}
Getting the Dataset
The raw MANTRA dataset consisting of $2$- and $3$-manifolds with up to $10$ vertices is provided here. For machine-learning applications and research, we provide a custom dataset loader package, which can be installed via the following command:
pip install mantra-dataset
After installation, the dataset can be used like this:
from mantra.datasets import ManifoldTriangulations
dataset = ManifoldTriangulations(
root="./data", # Root folder for storing data
manifold="2", # Whether to load 2- or 3-manifolds
version="latest" # Which version of the dataset to load
)
Provided you have pytorch-geometric installed,
here is a more comprehensive example, showing the use of random node features and how to transform it
for using graph neural networks:
from torch_geometric.transforms import Compose
from torch_geometric.transforms import FaceToEdge
from mantra.datasets import ManifoldTriangulations
from mantra.transforms import NodeIndex
from mantra.transforms import RandomNodeFeatures
dataset = ManifoldTriangulations(
root="./data",
manifold="2",
version="latest",
transform=Compose(
[
NodeIndex(),
RandomNodeFeatures(),
# Converts face indices to edge indices, thus essentially
# making the 1-skeleton available to a model.
FaceToEdge(remove_faces=False),
]
),
force_reload=True,
)
More Examples
Please find more example notebooks in the examples
folder:
FAQ
Q: Why MANTRA?
A: MANTRA is one of the first datasets providing prediction tasks that provably depend on the high-order features of the input data, in the case of MANTRA, simplices. MANTRA contributes to the benchmarking ecosystem for high-order neural networks by providing a large set of triangulations with precomputed topological properties that can be easily computed with deterministic algorithms but that are hard to compute for predictive models. The topological properties contained in MANTRA are elementary, meaning that good networks tackling complex topological problems should be able to completely solve this dataset. Currently, there is no model that can solve all the prediction tasks proposed in the dataset's paper.
Q: Why topological features?
A: Topology forms a fundamental theoretical foundation for natural sciences like physics and biology. Understanding a system's topology often reveals critical insights hardly accessible through other analytical methods. For neural networks to effectively tackle problems in these domains, they must develop capabilities to leverage topological information. This requires network architectures capable of identifying basic topological invariants in data—precisely the invariants that MANTRA provides. By incorporating these topological features, neural networks can capture essential structural and relational properties that traditional approaches might miss, enhancing their ability to model complex natural phenomena.
Q: Which are the main functions and classes implemented in this dataset?
A: The core class of the MANTRA package is ManifoldTriangulations. ManifoldTriangulations allows the user to load the MANTRA dataset using a InMemoryDataset format from torch_geometric. The transforms NodeIndex, RandomNodeFeatures, DegreeTransform, and DegreeTransformOneHotare also provided in this package. Concretely, NodeIndex transforms the original triangulation format in a torch-like tensor, and RandomNodeFeatures, DegreeTransform, and DegreeTransformOneHot assign input feature vectors to vertices in a the x attribute of the input Data representing a triangulation based either on random features or on the degree of each vertex, respectively.
Have a question that's not answered here? Please open an issue on our GitHub repository.
Acknowledgements
This work is dedicated to Frank H. Lutz, who passed away unexpectedly on November 10, 2023. May his memory be a blessing.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mantra_dataset-0.0.16.tar.gz.
File metadata
- Download URL: mantra_dataset-0.0.16.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc52373871f659a5ca0ae14112b22be562caaa3f01f8b19b93a2cdd15ea999be
|
|
| MD5 |
3bd8665bcfe41339460e056b8f2c5629
|
|
| BLAKE2b-256 |
ae1b4946e8c96c5caaf31afafa4798192b98ab83a6a02705ef2635cdee6daf2a
|
Provenance
The following attestation bundles were made for mantra_dataset-0.0.16.tar.gz:
Publisher:
publish_to_pypi.yaml on aidos-lab/mantra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mantra_dataset-0.0.16.tar.gz -
Subject digest:
fc52373871f659a5ca0ae14112b22be562caaa3f01f8b19b93a2cdd15ea999be - Sigstore transparency entry: 697569890
- Sigstore integration time:
-
Permalink:
aidos-lab/mantra@9f4414991170e64c18201b360100a5539931a9c7 -
Branch / Tag:
refs/tags/v0.0.16 - Owner: https://github.com/aidos-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yaml@9f4414991170e64c18201b360100a5539931a9c7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mantra_dataset-0.0.16-py3-none-any.whl.
File metadata
- Download URL: mantra_dataset-0.0.16-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf89250c4bc7390235feaeb0e733deaf107f8a6847ff011046f9909f9c68e6fc
|
|
| MD5 |
10035f29e1e52472dcafa2683945030b
|
|
| BLAKE2b-256 |
9d06c7a00edd61018f83265b896ccac4670028245f7d9b74032afc37cf65f096
|
Provenance
The following attestation bundles were made for mantra_dataset-0.0.16-py3-none-any.whl:
Publisher:
publish_to_pypi.yaml on aidos-lab/mantra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mantra_dataset-0.0.16-py3-none-any.whl -
Subject digest:
cf89250c4bc7390235feaeb0e733deaf107f8a6847ff011046f9909f9c68e6fc - Sigstore transparency entry: 697569899
- Sigstore integration time:
-
Permalink:
aidos-lab/mantra@9f4414991170e64c18201b360100a5539931a9c7 -
Branch / Tag:
refs/tags/v0.0.16 - Owner: https://github.com/aidos-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yaml@9f4414991170e64c18201b360100a5539931a9c7 -
Trigger Event:
push
-
Statement type: