SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.07347 · 2022

Lorentz group equivariant autoencoders

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2212.07347.json · badge: /api/ran/2212.07347.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
zichunhao/lgn-autoencoder canonical (classifier label)
classifier basis not recorded on the link
4 ran · 3 no recorded run
FunctionStatusWhere it lives
clebschSU2mat Ran
ran on a synthesized input
zichunhao/lgn-autoencoder/lgn/cg_lib/cg_dict.py
code served (permissive licence) · get_code("4cb1e3215fe815a7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family float, shape (3, 2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from scipy.special import factorial

# The function clebschSU2mat takes three parameters: j1, j2, j3
# These are angular momentum quantum numbers (floats)
# Based on the function body:
# - j1, j2, j3 are used in arithmetic operations and range calculations
# - They represent total angular momentum values
# - Valid values should satisfy triangle inequality: |j1 - j2| <= j3 <= j1 + j2
# - j1, j2, j3 can be integers or half-integers (0, 0.5, 1, 1.5, 2, etc.)

# Create valid angular momentum quantum numbers
j1 = 1.0      # Total angular momentum 1
j2 = 0.5      # Total angular momentum 0.5
j3 = 1.5      # Total angular momentum 1.5 (satisfies |1.0 - 0.5| <= 1.5 <= 1.0 + 0.5)

ARGS = {
    "j1": j1,
    "j2": j2,
    "j3": j3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (3, 2, 4) — shape (3, 2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clebschmat Ran
ran on a synthesized input
zichunhao/lgn-autoencoder/lgn/cg_lib/cg_dict.py
code served (permissive licence) · get_code("2acdf5aa4c1fe325")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family float, shape (9, 9, 9) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from scipy.special import factorial

def memoize(func):
    cache = dict()

    def memoized_func(*args):
        if args in cache:
            return cache[args]
        result = func(*args)
        cache[args] = result
        return result
    return memoized_func

def clebschSU2mat(j1, j2, j3):
    mat = np.zeros((int(2 * j1 + 1), int(2 * j2 + 1), int(2 * j3 + 1)))
    if int(2 * j3) in range(int(2 * abs(j1 - j2)), int(2 * (j1 + j2)) + 1, 2):
        for m1 in (x / 2 for x in range(-int(2 * j1), int(2 * j1) + 1, 2)):
            for m2 in (x / 2 for x in range(-int(2 * j2), int(2 * j2) + 1, 2)):
                if abs(m1 + m2) <= j3:
                    mat[int(j1 + m1), int(j2 + m2), int(j3 + m1 + m2)] = clebschSU2((j1, m1), (j2, m2), (j3, m1 + m2))
    return np.array(mat)

def clebschSU2(idx1, idx2, idx3):
    j1, m1 = idx1
    j2, m2 = idx2
    j3, m3 = idx3
    if m3 != m1 + m2:
        return 0
    vmin = int(np.max([-j1 + j2 + m3, -j1 + m1, 0]))
    vmax = int(np.min([j2 + j3 + m1, j3 - j1 + j2, j3 + m3]))
    C = np.sqrt((2.0 * j3 + 1.0) * factorial(j3 + j1 - j2) * factorial(j3 - j1 + j2) * factorial(j1 + j2 - j3) * factorial(j3 + m3) * factorial(j3 - m3) / (factorial(j1 + j2 + j3 + 1) * factorial(j1 - m1) * factorial(j1 + m1) * factorial(j2 - m2) * factorial(j2 + m2)))
    S = 0
    for v in range(vmin, vmax + 1):
        S += (-1.0) ** (v + j2 + m2) / factorial(v) * factorial(j2 + j3 + m1 - v) * factorial(j1 - m1 + v) / factorial(j3 - j1 + j2 - v) / factorial(j3 + m3 - v) / factorial(v + j1 - j2 - m3)
    C = C * S
    return C

def clebschmat(rep1, rep2, rep, fastcgmat=memoize(clebschSU2mat)):
    k1, n1 = rep1
    k2, n2 = rep2
    k, n = rep
    B1 = np.concatenate([fastcgmat(k / 2, n / 2, i / 2) for i in range(abs(k - n), k + n + 1, 2)], axis=-1)
    B2a = fastcgmat(k1 / 2, k2 / 2, k / 2)
    B2b = fastcgmat(n1 / 2, n2 / 2, n / 2)
    B3a = np.concatenate([fastcgmat(k1 / 2, n1 / 2, i1 / 2) for i1 in range(abs(k1 - n1), k1 + n1 + 1, 2)], axis=-1)
    B3b = np.concatenate([fastcgmat(k2 / 2, n2 / 2, i2 / 2) for i2 in range(abs(k2 - n2), k2 + n2 + 1, 2)], axis=-1)
    H = np.einsum('cab', np.einsum('abc,dea,ghb,dgk,ehn', B1, B2a, B2b, B3a, B3b))
    return H

ARGS = {
    "rep1": (2, 2),
    "rep2": (2, 2),
    "rep": (2, 2),
    "fastcgmat": memoize(clebschSU2mat)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (9, 9, 9) — shape (9, 9, 9) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
memoize Ran
ran on a synthesized input
zichunhao/lgn-autoencoder/lgn/cg_lib/cg_dict.py
code served (permissive licence) · get_code("85dd44c534a83507")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The memoize function takes a single parameter: func
# func should be a callable that accepts *args
# The function caches results based on args tuples

def sample_func(x, y=10):
    """A simple function to memoize"""
    return x + y

ARGS = {
    "func": sample_func
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mix_zweight_zvec Ran
ran on a synthesized input
zichunhao/lgn-autoencoder/lgn/g_lib/cplx_lib.py
code served (permissive licence) · get_code("154d32fd3751fee9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function mix_zweight_zvec expects:
# - weight: a complex tensor (represented as real/imag stacked along zdim)
# - part: a complex tensor (represented as real/imag stacked along zdim)
# - zdim: dimension along which real/imag components are stacked (default 0)
#
# The function unbinds these tensors along zdim to get real and imaginary parts,
# then performs matrix multiplication (@) operations.
# So weight and part need compatible shapes for matrix multiplication.

# Create weight tensor: shape [2, 4, 3] where dim 0 is real/imag, then 4x3 matrix
weight = torch.randn(2, 4, 3)

# Create part tensor: shape [2, 3, 5] where dim 0 is real/imag, then 3x5 matrix
# The inner dimension (3) must match weight's second dimension for @ to work
part = torch.randn(2, 3, 5)

# zdim parameter specifies which dimension holds the real/imag split
zdim = 0

ARGS = {
    "weight": weight,
    "part": part,
    "zdim": zdim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 5) — shape (2, 4, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
complex_kron_product Not yet run
unverified (harvested, no recorded run)
zichunhao/lgn-autoencoder/lgn/cg_lib/cg_ops.py
code served (permissive licence) · get_code("7af8d5ba9e32bcb0")
How it ran

no invocation recorded.

mix_zweight_zscalar Not yet run
unverified (harvested, no recorded run)
zichunhao/lgn-autoencoder/lgn/g_lib/cplx_lib.py
code served (permissive licence) · get_code("0c5b5d0bcf17d570")
How it ran

no invocation recorded.

mul_zscalar_zirrep Not yet run
unverified (harvested, no recorded run)
zichunhao/lgn-autoencoder/lgn/g_lib/cplx_lib.py
code served (permissive licence) · get_code("cb8705555ffd343b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

There has been significant work recently in developing machine learning (ML) models in high energy physics (HEP) for tasks such as classification, simulation, and anomaly detection. Often these models are adapted from those designed for datasets in computer vision or natural language processing, which lack inductive biases suited to HEP data, such as equivariance to its inherent symmetries. Such biases have been shown to make models more performant and interpretable, and reduce the amount of training data needed. To that end, we develop the Lorentz group autoencoder (LGAE), an autoencoder model equivariant with respect to the proper, orthochronous Lorentz group $\mathrm{SO}^+(3,1)$, with a latent space living in the representations of the group. We present our architecture and several experimental results on jets at the LHC and find it outperforms graph and convolutional neural network baseline models on several compression, reconstruction, and anomaly detection metrics. We also demonstrate the advantage of such an equivariant model in analyzing the latent space of the autoencoder, which can improve the explainability of potential anomalies discovered by such ML models.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2212.07347")
get_code_for_paper("2212.07347")
have("2212.07347")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2212.07347.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2212.07347.svg)](https://syntology.ai/paper/2212.07347)

Connect an agent — have() is free.