Lorentz Local Canonicalization
Project description
This repository contains a standalone implementation of Lorentz Local Canonicalization (LLoCa) by Jonas Spinner, Luigi Favaro, Peter Lippmann, Sebastian Pitz, Gerrit Gerhartz, Huilin Qu, Tilman Plehn, and Fred A. Hamprecht. LLoCa uses equivariantly predicted local reference frames and geometric message passing between these frames to make any architecture Lorentz-equivariant. You can read more about LLoCa in the following two papers and in the LLoCa documentation:
- Lorentz Local Canonicalization: How to make any Network Lorentz-Equivariant (ML audience)
- Lorentz-Equivariance without Limitations (HEP audience)
Installation
You can either install the latest release using pip
pip install lloca
or clone the repository and install the package in dev mode
git clone https://github.com/heidelberg-hepml/lloca.git
cd lloca
pip install -e .
How to use LLoCa
Please have a look at the LLoCa documentation (WIP) and our example notebook for the LLoCa-Transformer.
Features
- Backbone architectures in
lloca/backbone:Transformer,ParticleTransformer,ParticleNet,GraphNet,MLP - The
Transformerbackbone supports several attention kernels that can be installed optionally with e.g.pip install lloca[xformers_attention] LLoCaMessagePassingas blueprint for genericLLoCagraph network backbones- Equivariant vector predictors in
lloca/equivectors:EquiMLP - Local frames for equivariant architectures on several symmetry groups: $SO(1,3)$ (
LearnedPDFrames,LearnedSO13Frames,LearnedRestFrames), $SO(3)$ (LearnedSO3Frames) and $SO(2)$ (LearnedSO2Frames); as well as the corresponding random global frames for data augmentation - Support for arbitrary higher-order representations with the
TensorRepsclass
Coming soon:
- More
equivectorsoptions - Parity-odd representations
- Support for cross-attention
Examples
- https://github.com/heidelberg-hepml/lorentz-frames: Codebase for the original papers; will eventually be based on the
llocarepository. For now, development takes place inlorentz-framesandllocaserves as a stable version for others to work with.
Let us know if you use lloca, so we can add your repo to the list!
Citation
If you find this code useful in your research, please cite our papers
@article{Favaro:2025pgz,
author = "Favaro, Luigi and Gerhartz, Gerrit and Hamprecht, Fred A. and Lippmann, Peter and Pitz, Sebastian and Plehn, Tilman and Qu, Huilin and Spinner, Jonas",
title = "{Lorentz-Equivariance without Limitations}",
eprint = "2508.14898",
archivePrefix = "arXiv",
primaryClass = "hep-ph",
month = "8",
year = "2025"
}
@article{Spinner:2025prg,
author = "Spinner, Jonas and Favaro, Luigi and Lippmann, Peter and Pitz, Sebastian and Gerhartz, Gerrit and Plehn, Tilman and Hamprecht, Fred A.",
title = "{Lorentz Local Canonicalization: How to Make Any Network Lorentz-Equivariant}",
eprint = "2505.20280",
archivePrefix = "arXiv",
primaryClass = "stat.ML",
month = "5",
year = "2025"
}
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 lloca-1.2.0.tar.gz.
File metadata
- Download URL: lloca-1.2.0.tar.gz
- Upload date:
- Size: 222.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb87a3f24d65f7848e6b19d2cfe50fe49a302975d00b005af43f2971112c83d1
|
|
| MD5 |
f54bf0395ef8d05f69b273402f7edc0a
|
|
| BLAKE2b-256 |
7f2838d95d0aa6b9c64f587ffbbf5fea228fd9ca158d648b997da457bf38584a
|
Provenance
The following attestation bundles were made for lloca-1.2.0.tar.gz:
Publisher:
release.yaml on heidelberg-hepml/lloca
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lloca-1.2.0.tar.gz -
Subject digest:
fb87a3f24d65f7848e6b19d2cfe50fe49a302975d00b005af43f2971112c83d1 - Sigstore transparency entry: 644720971
- Sigstore integration time:
-
Permalink:
heidelberg-hepml/lloca@893e147623a80ef5ddcdd7eaca4401ab70e56ddd -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/heidelberg-hepml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@893e147623a80ef5ddcdd7eaca4401ab70e56ddd -
Trigger Event:
push
-
Statement type:
File details
Details for the file lloca-1.2.0-py3-none-any.whl.
File metadata
- Download URL: lloca-1.2.0-py3-none-any.whl
- Upload date:
- Size: 56.9 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 |
82639e61f8823fd7689a0af71d4505fcf9044738e9bef619905f4dd99841b5a0
|
|
| MD5 |
78bd6b2f645a3e5f0888f68ffb533bfe
|
|
| BLAKE2b-256 |
e2ee307b2be35ef9f6112df69007bf816704c3916a0ce85e29bd06eef08f51f9
|
Provenance
The following attestation bundles were made for lloca-1.2.0-py3-none-any.whl:
Publisher:
release.yaml on heidelberg-hepml/lloca
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lloca-1.2.0-py3-none-any.whl -
Subject digest:
82639e61f8823fd7689a0af71d4505fcf9044738e9bef619905f4dd99841b5a0 - Sigstore transparency entry: 644720976
- Sigstore integration time:
-
Permalink:
heidelberg-hepml/lloca@893e147623a80ef5ddcdd7eaca4401ab70e56ddd -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/heidelberg-hepml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@893e147623a80ef5ddcdd7eaca4401ab70e56ddd -
Trigger Event:
push
-
Statement type: