Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.ipynb linguist-vendored
*.ipynb linguist-vendored
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
https://www.contributor-covenant.org/faq
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ jobs:
token: ${{ secrets.DOCUMENTATION_KEY }}
repository-name: geometric-intelligence/geometric-intelligence.github.io
target-folder: topobench
clean: true
clean: true
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
# This ensures the ruff version matches what you have in pyproject.toml
version-file: "pyproject.toml"
# Optional: fails the build if the code changes (e.g. formatting)
changed-files: "true"
changed-files: "true"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
fail_ci_if_error: false
fail_ci_if_error: false
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,4 @@ wandb/

# test temporary
.test_tmp/
uv.lock
uv.lock
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-ast
- id: check-json
- id: check-yaml
- id: check-symlinks
- id: mixed-line-ending
args:
- --fix=no
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ Assess how your model compares against state-of-the-art topological neural netwo
<a href="#gear-neural-networks">Neural Networks</a> •
<a href="#rocket-liftings-and-transforms">Liftings and Transforms</a> •
<a href="#books-datasets">Datasets</a> •
<a href="#mag-references">References</a>
<a href="#mag-references">References</a>
</p>


---

> 🏆 The **TAG-DS Topological Deep Learning Challenge 2025** has concluded! A huge shotout to all participants. Check out the winners and honorable mentions on [`the challenge website`](https://geometric-intelligence.github.io/topobench/tdl-challenge/index.html).
> 🏆 The **TAG-DS Topological Deep Learning Challenge 2025** has concluded! A huge shout-out to all participants. Check out the winners and honorable mentions on [`the challenge website`](https://geometric-intelligence.github.io/topobench/tdl-challenge/index.html).

---

## :pushpin: Overview

`TopoBench` (TB) is a modular Python library designed to standardize benchmarking and accelerate research in Topological Deep Learning (TDL). In particular, TB allows to train and compare the performances of all sorts of Topological Neural Networks (TNNs) across the different topological domains, where by _topological domain_ we refer to a graph, a simplicial complex, a cellular complex, or a hypergraph. For detailed information, please refer to the [`TopoBench: A Framework for Benchmarking Topological Deep Learning`](https://arxiv.org/pdf/2406.06642) paper.
`TopoBench` (TB) is a modular Python library designed to standardize benchmarking and accelerate research in Topological Deep Learning (TDL). In particular, TB allows training and comparing the performances of all sorts of Topological Neural Networks (TNNs) across the different topological domains, where by _topological domain_ we refer to a graph, a simplicial complex, a cellular complex, or a hypergraph. For detailed information, please refer to the [`TopoBench: A Framework for Benchmarking Topological Deep Learning`](https://arxiv.org/pdf/2406.06642) paper.

<p align="center">
<img src="resources/workflow.jpg" width="700">
Expand Down Expand Up @@ -94,7 +94,7 @@ uv sync --all-extras
Once the environment is active, you can launch the TopoBench pipeline:
```bash
# Using the activated virtual environment
python -m topobench
python -m topobench

# Or execute directly via uv without manual activation
uv run python -m topobench
Expand Down Expand Up @@ -201,7 +201,7 @@ bash scripts/reproduce.sh

## :anchor: Tutorials

Explore our [tutorials](https://github.com/geometric-intelligence/TopoBench/tree/main/tutorials) for further details on how to add new datasets, transforms/liftings, and benchmark tasks.
Explore our [tutorials](https://github.com/geometric-intelligence/TopoBench/tree/main/tutorials) for further details on how to add new datasets, transforms/liftings, and benchmark tasks.

## :gear: Neural Networks

Expand Down Expand Up @@ -264,13 +264,13 @@ We list the neural networks trained and evaluated by `TopoBench`, organized by t

## :rocket: Liftings and Transforms

We list the liftings used in `TopoBench` to transform datasets. Here, a _lifting_ refers to a function that transforms a dataset defined on a topological domain (_e.g._, on a graph) into the same dataset but supported on a different topological domain (_e.g._, on a simplicial complex).
We list the liftings used in `TopoBench` to transform datasets. Here, a _lifting_ refers to a function that transforms a dataset defined on a topological domain (_e.g._, on a graph) into the same dataset but supported on a different topological domain (_e.g._, on a simplicial complex).

### <a name="structural_liftings"></a> Structural Liftings

The structural lifting is responsible for the transformation of the underlying relationships or elements of the data. For instance, it might determine how nodes and edges in a graph are mapped into triangles and tetrahedra in a simplicial complex. This structural transformation can be further categorized into connectivity-based, where the mapping relies solely on the existing connections within the data, and feature-based, where the data's inherent properties or features guide the new structure.

We enumerate below the structural liftings currently implemented in `TopoBench`; please check out the provided description links for further details.
We enumerate below the structural liftings currently implemented in `TopoBench`; please check out the provided description links for further details.

**Remark:**: Most of these liftings are adaptations of winner submissions of the ICML TDL Challenge 2024 ([paper](https://proceedings.mlr.press/v251/bernardez24a.html) | [repo](https://github.com/pyt-team/challenge-icml-2024)); see the [Structural Liftings wiki](https://github.com/geometric-intelligence/TopoBench/wiki/Structural-Liftings) for a complete list of compatible liftings.

Expand Down Expand Up @@ -338,11 +338,11 @@ Feature liftings address the transfer of data attributes or features during mapp
| ProjectionSum | Projects r-cell features of a graph to r+1-cell structures utilizing incidence matrices \(B_{r}\). | All |
| ConcatenationLifting | Concatenate r-cell features to obtain r+1-cell features. | Simplicial |

### Data Transformations
### Data Transformations

Specially useful in pre-processing steps, these are the general data manipulations currently implemented in `TopoBench`:

| Transform | Description |
| Transform | Description |
| --- | --- |
| OneHotDegreeFeatures | Adds the node degree as one hot encodings to the node features. |
| NodeFeaturesToFloat |Converts the node features of the input graph to float. |
Expand Down Expand Up @@ -473,12 +473,12 @@ If you find `TopoBench` useful, we would appreciate if you cite us!

<details>
<summary><b> More information regarding Topological Deep Learning </b></summary>

[Topological Graph Signal Compression](https://arxiv.org/pdf/2308.11068)

[Architectures of Topological Deep Learning: A Survey on Topological Neural Networks](https://par.nsf.gov/servlets/purl/10477141)
[TopoX: a suite of Python packages for machine learning on topological domains](https://arxiv.org/pdf/2402.02441)

[TopoX: a suite of Python packages for machine learning on topological domains](https://arxiv.org/pdf/2402.02441)
</details>

---
Expand All @@ -490,4 +490,3 @@ Feel free to reach out via email if you want to collaborate, do your thesis with

📧 **Contact Email:** [topological.intelligence@gmail.com](mailto:topological.intelligence@gmail.com)
▶️ **YouTube Channel:** [Topological Intelligence](https://www.youtube.com/@TopologicalIntelligence)

2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ coverage:
precision: 2
ignore:
- "test/"
- "topobench/run.py"
- "topobench/run.py"
2 changes: 1 addition & 1 deletion configs/callbacks/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ model_summary:

learning_rate_monitor:
_target_: lightning.pytorch.callbacks.LearningRateMonitor
logging_interval: "epoch"
logging_interval: "epoch"
2 changes: 1 addition & 1 deletion configs/callbacks/model_timer.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://lightning.ai/docs/pytorch/stable/api/lightning.pytorch.callbacks.Timer.html

model_timer:
_target_: topobench.callbacks.timer_callback.PipelineTimer
_target_: topobench.callbacks.timer_callback.PipelineTimer
3 changes: 1 addition & 2 deletions configs/dataset/graph/AQSOL.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.MoleculeDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: AQSOL
data_name: AQSOL
Expand Down Expand Up @@ -29,4 +29,3 @@ dataloader_params:
batch_size: 10 # We have an issue with allowing multiple graphs in a batch due to sparse incidences
num_workers: 0
pin_memory: False

7 changes: 2 additions & 5 deletions configs/dataset/graph/IMDB-BINARY.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.TUDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: TUDataset
data_name: IMDB-BINARY
Expand Down Expand Up @@ -29,9 +29,6 @@ split_params:

# Dataloader parameters
dataloader_params:
batch_size: 64
batch_size: 64
num_workers: 0
pin_memory: False



5 changes: 1 addition & 4 deletions configs/dataset/graph/IMDB-MULTI.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.TUDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: TUDataset
data_name: IMDB-MULTI
Expand Down Expand Up @@ -32,6 +32,3 @@ dataloader_params:
batch_size: 64
num_workers: 0
pin_memory: False



2 changes: 1 addition & 1 deletion configs/dataset/graph/MUTAG.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.TUDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: TUDataset
data_name: MUTAG
Expand Down
7 changes: 2 additions & 5 deletions configs/dataset/graph/NCI1.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
loader:
_target_: topobench.data.loaders.TUDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: TUDataset
data_name: NCI1
Expand All @@ -26,9 +26,6 @@ split_params:

# Dataloader parameters
dataloader_params:
batch_size: 64
batch_size: 64
num_workers: 0
pin_memory: False



5 changes: 1 addition & 4 deletions configs/dataset/graph/NCI109.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
loader:
_target_: topobench.data.loaders.TUDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: TUDataset
data_name: NCI109
Expand Down Expand Up @@ -29,6 +29,3 @@ dataloader_params:
batch_size: 64
num_workers: 0
pin_memory: False



5 changes: 1 addition & 4 deletions configs/dataset/graph/PROTEINS.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.TUDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: TUDataset
data_name: PROTEINS
Expand Down Expand Up @@ -30,6 +30,3 @@ dataloader_params:
batch_size: 128 # We have an issue with allowing multiple graphs in a batch due to sparse incidences
num_workers: 0
pin_memory: False



7 changes: 2 additions & 5 deletions configs/dataset/graph/REDDIT-BINARY.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.TUDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: TUDataset
data_name: REDDIT-BINARY
Expand Down Expand Up @@ -29,9 +29,6 @@ split_params:

# Dataloader parameters
dataloader_params:
batch_size: 128
batch_size: 128
num_workers: 0
pin_memory: False



2 changes: 1 addition & 1 deletion configs/dataset/graph/US-county-demos.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.USCountyDemosDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: cornel
data_name: US-county-demos
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/ZINC.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.MoleculeDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: ZINC
data_name: ZINC
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/amazon_ratings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.HeterophilousGraphDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: heterophilic
data_name: amazon_ratings
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/cocitation_citeseer.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.PlanetoidDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: cocitation
data_name: citeseer
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/cocitation_cora.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.PlanetoidDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: cocitation
data_name: Cora
Expand Down
2 changes: 1 addition & 1 deletion configs/dataset/graph/cocitation_pubmed.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.PlanetoidDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: cocitation
data_name: PubMed
Expand Down
4 changes: 2 additions & 2 deletions configs/dataset/graph/manual_dataset.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.ManualGraphDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: manual_dataset
data_name: manual
Expand All @@ -28,6 +28,6 @@ split_params:

# Dataloader parameters
dataloader_params:
batch_size: 1
batch_size: 1
num_workers: 1
pin_memory: False
2 changes: 1 addition & 1 deletion configs/dataset/graph/minesweeper.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dataset loader config
loader:
_target_: topobench.data.loaders.HeterophilousGraphDatasetLoader
parameters:
parameters:
data_domain: graph
data_type: heterophilic
data_name: minesweeper
Expand Down
Loading
Loading