SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.08838 · NeurIPS · 2023

AQuaMaM: An Autoregressive, Quaternion Manifold Model for Rapidly Estimating Complex SO(3) Distributions

Michael Alcorn

arXiv · PDF · Open in the Atlas

Code that ran

5 of 13 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 0 have no contract verdict; 5 failures of our instrument; 8 no recorded run), measured 2026-11-22; 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/2301.08838.json · badge: /api/ran/2301.08838.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
airalcorn2/aquamam community
Papers with Code archive
5 ran · 8 no recorded run
FunctionStatusWhere it lives
convert_q_tokens_to_vals Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("387eb74c2987e203")
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 2, dtype family float, shape (2, 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)

# Build the arguments for convert_q_tokens_to_vals

# tokens: shape (batch_size, num_dimensions) with indices into bins
# batch_size=2, num_dimensions=4
tokens = torch.tensor([
    [0, 1, 2, 0],
    [1, 2, 0, 1]
], dtype=torch.long)

# bins: 1D tensor of bin edges, must have at least 3 elements
# We'll create 5 bins to have enough distinct values
bins = torch.tensor([-1.0, -0.5, 0.0, 0.5, 1.0])

# bin_bottoms: 1D tensor mapping bin indices to their bottom values
# Should have length equal to number of bins
# These are the lower boundaries of each bin
bin_bottoms = torch.tensor([-1.0, -0.5, 0.0, 0.5, 1.0])

ARGS = {
    "tokens": tokens,
    "bins": bins,
    "bin_bottoms": bin_bottoms,
}
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 2, dtype family float, shape (2, 5) — shape (2, 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
finish_beam_search Ran
ran; our contract draft was wrong, not the code
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("f19916a82a3ac12e")
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 tuple. 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

torch.manual_seed(0)

# Analyzing the function:
# - beam: a tensor that gets indexed as beam[:, :n_preds] and beam[:, n_preds]
#   It has shape (batch_size, n_preds + 1, feature_dim) after reshape
# - beam_log_ps: a tensor that gets reshaped to (-1, k)
# - k: an integer used in reshaping beam_log_ps

# Before reshape, beam should have shape (batch_size * k, n_preds + 1)
# beam_log_ps before reshape should have shape that can become (batch_size, k)

batch_size = 2
k = 3
n_preds = 4
feature_dim = 5

# beam starts with shape (batch_size * k, n_preds + 1)
# It contains n_preds values plus one value to be computed
beam = torch.randn(batch_size * k, n_preds + 1)

# beam_log_ps should reshape to (batch_size, k)
# So it should have batch_size * k elements
beam_log_ps = torch.randn(batch_size * k)

ARGS = {
    "beam": beam,
    "beam_log_ps": beam_log_ps,
    "k": k,
}
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 tuple — a tuple output has no array shape of its own; none is 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
get_sample_tokens Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("c15481a2c2527eed")
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 1, dtype family int, shape (2,) 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)

# Create bins: sorted tensor of bin edges
bins = torch.tensor([-1.0, -0.5, 0.0, 0.5, 1.0])

# Create bin_bottoms: the lower bound of each bin (same length as bins)
bin_bottoms = torch.tensor([-1.0, -0.5, 0.0, 0.5, 1.0])

# Create qs: shape (batch_size, 3) for qx, qy, qz components
# Initialize with small valid values (within unit sphere constraint)
qs = torch.tensor([
    [0.1, 0.1, 0.1],
    [0.2, 0.2, 0.2]
], dtype=torch.float32)

# Create x: logits tensor, shape (batch_size, num_bins)
# This is the constraint logits that will be masked
x = torch.randn(2, 5, dtype=torch.float32)

# which_val: integer indicating which component to sample (0, 1, or 2)
which_val = 0

ARGS = {
    'which_val': which_val,
    'qs': qs,
    'bins': bins,
    'bin_bottoms': bin_bottoms,
    'x': x
}
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 1, dtype family int, shape (2,) — shape (2,) 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
run_beam_search Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("1527cd7c17929eaf")
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 2, dtype family float, shape (4, 1) 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
import numpy as np

torch.manual_seed(0)

# Parameters for run_beam_search
n_bins = 4
k = 2
batch_size = 2

# Create bins and bin_bottoms
# bins should be sorted, used for torch.bucketize
bins = torch.linspace(-1, 1, n_bins)
# bin_bottoms maps bin indices to their bottom values
bin_bottoms = torch.linspace(-1, 1, n_bins)

# Create beam tensor: shape (batch_size * k, 3) to hold qx, qy, qz values
# which_val can be 0, 1, or 2, so we need at least 3 columns
beam = torch.zeros(batch_size * k, 3)

# Create beam_log_ps: log probabilities for beam search
# Shape (batch_size, k) initially, will be flattened
beam_log_ps = torch.zeros(batch_size, k)

# Create x tensor: logits for softmax
# When which_val == 0: x should have shape (batch_size * k, n_bins)
# When which_val > 0: x should have shape (batch_size * k, n_bins) for log_softmax
x = torch.randn(batch_size * k, n_bins)

# which_val parameter: test with 0 (first iteration)
which_val = 0

ARGS = {
    "which_val": which_val,
    "x": x,
    "k": k,
    "beam": beam,
    "bins": bins,
    "bin_bottoms": bin_bottoms,
    "beam_log_ps": beam_log_ps,
}
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 Tensor, ndim 2, dtype family float, shape (4, 1) — shape (4, 1) 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
sample_qs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("e47cdb1e013d1bf6")
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 2, dtype family float, shape (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 torch

torch.manual_seed(0)

# Analyze the function:
# - bin_bottoms: indexed by tokens, so needs shape (num_bins, ...)
# - tokens: shape (batch, num_tokens), contains indices into bin_bottoms and bins
# - bins: indexed by tokens, so needs shape (num_bins, ...)
# - bin_width: scalar or tensor used in arithmetic

# Create small tensors with distinct dimensions
batch_size = 2
num_tokens = 4
num_bins = 5

# bin_bottoms: (num_bins,) - indexed by token values
bin_bottoms = torch.randn(num_bins)

# tokens: (batch_size, num_tokens) - contains indices 0..num_bins-1
tokens = torch.randint(0, num_bins, (batch_size, num_tokens))

# bins: (num_bins,) - indexed by token values, used for sign extraction
bins = torch.randn(num_bins)

# bin_width: scalar
bin_width = 0.1

ARGS = {
    "bin_bottoms": bin_bottoms,
    "tokens": tokens,
    "bins": bins,
    "bin_width": bin_width,
}
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 2, dtype family float, shape (2, 4) — shape (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
AQuaMaM Not yet run
unverified (harvested, no recorded run)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("10bd54d8bf14061e")
How it ran

no invocation recorded.

MultiheadAttention Not yet run
unverified (harvested, no recorded run)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("2a40c453f8215cf1")
How it ran

no invocation recorded.

TransformerEncoder Not yet run
unverified (harvested, no recorded run)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("d97a0fa2d6f60bc1")
How it ran

no invocation recorded.

TransformerEncoderLayer Not yet run
unverified (harvested, no recorded run)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("8a26e8bdd622e3a7")
How it ran

no invocation recorded.

constrain_qs Not yet run
unverified (harvested, no recorded run)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("b520207567af5fb2")
How it ran

no invocation recorded.

constrain_qys Not yet run
unverified (harvested, no recorded run)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("316da43d2dbc5b82")
How it ran

no invocation recorded.

constrain_qzs Not yet run
unverified (harvested, no recorded run)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("afc7cba7ac0f71ad")
How it ran

no invocation recorded.

multi_head_attention_forward Not yet run
unverified (harvested, no recorded run)
airalcorn2/aquamam/aquamam.py
code served (permissive licence) · get_code("968809b799fc5586")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 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 13 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

Accurately modeling complex, multimodal distributions for rotations in threedimensions, i.e., the SO(3) group, is challenging due to the curvature of the rotation manifold. The recently described implicit-PDF (IPDF) is a simple, elegant, and effective approach for learning arbitrary distributions on SO(3) up to a given precision. However, inference with IPDF requires N forward passes through the network's final multilayer perceptron (where N places an upper bound on the likelihood that can be calculated by the model), which is prohibitively slow for those without the computational resources necessary to parallelize the queries. In this paper, I introduce AQuaMaM, 23 a neural network capable of both learning complex distributions on the rotation manifold and calculating exact likelihoods for query rotations in a single forward pass. Specifically, AQuaMaM autoregressively models the projected components of unit quaternions as mixtures of uniform distributions that partition their geometrically-restricted domain of values. When trained on an "infinite" toy dataset with ambiguous viewpoints, AQuaMaM rapidly converges to a sampling distribution closely matching the true data distribution. In contrast, the sampling distribution for IPDF dramatically diverges from the true data distribution, despite IPDF approaching its theoretical minimum evaluation loss during training. When trained on a constructed dataset of 500,000 renders of a die in different rotations, AQuaMaM reaches a test log-likelihood 14% higher than IPDF. Further, compared to IPDF, AQuaMaM uses 24% fewer parameters, has a prediction throughput 52× faster on a single GPU, and converges in a similar amount of time during training. * Research conducted while MAA was an ORISE Fellow with the USDA. 2 Pronounced "aqua ma'am". 3 All code to generate the datasets, train and evaluate the models, and generate the figures can be found at: https://github.com/airalcorn2/aquamam. 4 SO(3) stands for "special orthogonal group in three dimensions", with the "special" referring to the fact that all rotation matrices have a determinant of one. See: https://blogs.scientificamerican.com/ roots-of-unity/a-few-of-my-favorite-spaces-so-3/ for a popular science introduction to SO(3).

For agents

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

get_harvested_code_for_paper("2301.08838")
get_code_for_paper("2301.08838")
have("2301.08838")

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

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

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

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

Connect an agent — have() is free.