MANTRA: The Manifold Triangulations Assemblage

April 17, 2025 · View on GitHub

GitHub contributors License

This is the benchmarks repository accompanying our ICLR 2025 paper on manifold triangulations. If you are looking for the dataset itself and the data loader, check out the data repository.

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},
}

Setup

Either via Docker or a standard setup. Start with:

git submodule update --init --recursive

Standard setup

  1. Setup python version 3.10.13. E.g. with pyenv install 3.10.13 and pyenv local 3.10.13. Set up a virtual environment, e.g. via python3 -m venv ./venv and source ./venv/bin/activate,
  2. Install dependencies via poetry
$ python -m pip install --upgrade pip
$ pip install poetry
$ poetry install
  1. pip install -e ./dependencies/TopoModelX/

Docker

Depending on your setup, you may need to run the docker commands via sudo.

  1. Install Docker on your device. On Ubuntu, for instance, refer to official_installation_instructions
  2. Edit the variables USER_NAME to GROUP_ID in the Dockerfile
  3. docker compose up --build -d. Check that container is running via docker ps
  4. docker exec -it mantra_container /bin/bash
  5. When inside the container, run source /deps/venv/bin/activate to source the ready virtual environment

Usage

  1. Change in code directory.
  2. Generate experiment configurations: ./generate_configs.sh
  3. Run experiments:
$ python ./experiments/run.py --mode "single" --config "/path/to/config.yaml" --wandb "wandb-project-id"

for running a single experiment or

$ python ./experiments/run.py --mode "all" --wandb "wandb-project-id"

for running all experiments.

  1. Run benchmarking
$ python ./experiments/run.py --mode "<single/all>" --checkpoints "<checkpoints/to/be/benchmarked>"
  1. Result processing and table generation.
$ python ./experiments/generate_tables.py
# optional
$ pandoc results_2fullmanifolds.md -o results_2fullmanifolds.pdf -V geometry:margin=0.1in -V geometry:a1paper

Results

Results can be inspected in notebooks/interpret_results.ipynb

Development

  • Formatting using black 24.4.2. Install via pip (pip install black==24.4.2).

Dataset distribution

Name
'S^2''RP^2''T^2''Klein bottle'''
30613672229465534584
Orientability
TrueFalse
342039718
Betti Numbers
Betti_0
1
43138
Betti_1
0123456
1670465514146136947917102234
Betti_2
01
397183420