{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/aquamam-an-autoregressive-quaternion-manifold","title":"AQuaMaM: An Autoregressive, Quaternion Manifold Model for Rapidly Estimating Complex SO(3) Distributions","arxiv_id":"2301.08838","date":"2023-01-21","proceeding":null,"authors":["Michael A. Alcorn"],"abstract":"Accurately modeling complex, multimodal distributions is necessary for optimal decision-making, but doing so for rotations in three-dimensions, 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, 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$\\times$ faster on a single GPU, and converges in a similar amount of time during training.","url_abs":"https://arxiv.org/abs/2301.08838v1","url_pdf":"https://arxiv.org/pdf/2301.08838v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"aquamam-an-autoregressive-quaternion-manifold","repo_url":"https://github.com/airalcorn2/aquamam","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"pose-estimation","task_name":"Pose Estimation"}],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2301.08838","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2301.08838"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/airalcorn2/aquamam","reach":null}],"summary":{"ran":5,"unverified":8},"by_repo_kind":{"listed":{"samples":13,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"387eb74c2987e203","entry":"convert_q_tokens_to_vals","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"387eb74c2987e203"}},{"code_sha256_prefix":"f19916a82a3ac12e","entry":"finish_beam_search","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f19916a82a3ac12e"}},{"code_sha256_prefix":"c15481a2c2527eed","entry":"get_sample_tokens","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c15481a2c2527eed"}},{"code_sha256_prefix":"1527cd7c17929eaf","entry":"run_beam_search","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1527cd7c17929eaf"}},{"code_sha256_prefix":"e47cdb1e013d1bf6","entry":"sample_qs","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e47cdb1e013d1bf6"}},{"code_sha256_prefix":"10bd54d8bf14061e","entry":"AQuaMaM","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"10bd54d8bf14061e"}},{"code_sha256_prefix":"2a40c453f8215cf1","entry":"MultiheadAttention","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a40c453f8215cf1"}},{"code_sha256_prefix":"d97a0fa2d6f60bc1","entry":"TransformerEncoder","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d97a0fa2d6f60bc1"}},{"code_sha256_prefix":"8a26e8bdd622e3a7","entry":"TransformerEncoderLayer","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8a26e8bdd622e3a7"}},{"code_sha256_prefix":"b520207567af5fb2","entry":"constrain_qs","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b520207567af5fb2"}},{"code_sha256_prefix":"316da43d2dbc5b82","entry":"constrain_qys","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"316da43d2dbc5b82"}},{"code_sha256_prefix":"afc7cba7ac0f71ad","entry":"constrain_qzs","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"afc7cba7ac0f71ad"}},{"code_sha256_prefix":"968809b799fc5586","entry":"multi_head_attention_forward","repo":"airalcorn2/aquamam","repo_kind":"listed","path":"aquamam.py","file_url":"https://github.com/airalcorn2/aquamam/blob/HEAD/aquamam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"968809b799fc5586"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}