ezgatr

Geometric Algebra Transformer Made Easy

https://github.com/guest400123064/ezgatr

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.6%) to scientific vocabulary

Keywords

3d-models geometric-algebra pytorch transformers
Last synced: 7 months ago · JSON representation ·

Repository

Geometric Algebra Transformer Made Easy

Basic Info
Statistics
  • Stars: 16
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
3d-models geometric-algebra pytorch transformers
Created over 1 year ago · Last pushed 12 months ago
Metadata Files
Readme License Citation

README.md

Geometric Algebra Transformer Made Easy

License: MIT test codecov Ruff types - Mypy Website PyPI Python 3.10 DOI

What is EzGATr?

EzGATr (Easy Geometric Algebra Transformer) intends to be a simple-to-use and lightweight Python library for building 3D Geometric Algebra Transformers (GATr). It is a collection of operators, modules, utilities, etc. build on top of PyTorch. In addition, EzGATr also seeks to bridge the gap between the mathematical formulations and corresponding implementations through extensive documentation and explanations to facilitate learning and potential future optimizations.

Installation

EzGATr is currently under active development. To install it, you can clone the repository and install it using pip. Use the -e flag to install it in editable mode for making quick changes.

bash $ git clone https://github.com/Guest400123064/ezgatr.git $ cd ezgatr $ pip install -e .

Alternatively, one can directly install it from PyPI.

bash $ pip install ezgatr

Usage

The quick start example shown below demonstrates how to use EzGATr to build a equivariant network with one input/output channel (e.g., a point cloud) and four hidden channels. The mock input data contains a batch of eight samples, each with 256 3D objects embedded as multi-vectors.

```python import torch import torch.nn as nn

from ezgatr.nn import EquiLinear from ezgatr.nn.functional import scalergatedgelu

class SimpleNet(nn.Module): def init(self): super(SimpleNet, self).init() self.fc1 = EquiLinear(1, 4) self.fc2 = EquiLinear(4, 1)

def forward(self, x):
    x = self.fc1(x)
    x = scaler_gated_gelu(x)
    x = self.fc2(x)
    return x

net = SimpleNet() in_ = torch.randn(8, 256, 1, 16) out = net(in_) ```

One can refer to this example for how to build a full-fledged GATr model with EzGATr, involving equivariant geometric attention and geometric MLP.

API References

The complete API references for EzGATr can be found here. TL;DR, the package is organized as follows:

  • ezgatr.nn: Contains the core modules and layers for building GATr models. It is organized similarly to PyTorch's torch.nn package, where the functional submodule contains lower-level operators and transformations.
  • ezgatr.interfaces: Contains the utility functions that help encode and decode 3D objects to and from multi-vectors.
  • ezgatr.nets: Contains off-of-the-shelf networks built with EzGATr building blocks. It can also be used as references for building custom networks with EzGATr.

Citation and Authors

If you find EzGATr useful in your research, please consider citing it using the following BibTeX entry:

bibtex @misc{ezgatr2024, author = {Yuxuan Wang, Xiatao Sun}, title = {EzGATr: Geometric Algebra Transformer Made Easy}, year = 2024, publisher = {Zenodo}, version = {v0.1.0-alpha}, doi = {10.5281/zenodo.13920438}, url = {https://doi.org/10.5281/zenodo.13920438} }

EzGATr leveraged the work from GATr (official GitHub repository) by Johann Brehmer, Pim de Haan, Sönke Behrends, and Taco Cohen, published at NeurIPS 2023. Please consider citing their work as well.

bibtex @inproceedings{NEURIPS2023_6f6dd92b, author = {Brehmer, Johann and de Haan, Pim and Behrends, S\"{o}nke and Cohen, Taco S}, booktitle = {Advances in Neural Information Processing Systems}, editor = {A. Oh and T. Naumann and A. Globerson and K. Saenko and M. Hardt and S. Levine}, pages = {35472--35496}, publisher = {Curran Associates, Inc.}, title = {Geometric Algebra Transformer}, url = {https://proceedings.neurips.cc/paper_files/paper/2023/file/6f6dd92b03ff9be7468a6104611c9187-Paper-Conference.pdf}, volume = {36}, year = {2023} }

License

EzGATr is distributed under the terms of the MIT license.

Owner

  • Name: Yuxuan Wang
  • Login: Guest400123064
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Wang
  given-names: Yuxuan
- family-names: Sun
  given-names: Xiatao
orcid: https://doi.org/10.5281/zenodo.13920438
title:Guest400123064/ezgatr: v0.1.0-alpha
version: v0.1.0-alpha
date-released: 2024-10-11

GitHub Events

Total
  • Watch event: 10
  • Push event: 10
Last Year
  • Watch event: 10
  • Push event: 10

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 6 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: ezgatr
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 6 Last month
Rankings
Dependent packages count: 10.2%
Average: 33.8%
Dependent repos count: 57.5%
Maintainers (1)
Last synced: 8 months ago