Change the Product, Keep the Parameters: Associative Algebra Layers for Transformers

Ilya Koziev, Ivan Oseledets

arXiv:2609.32814 · 2026-09-29 공개 · arXiv · PDF

transformer parameter-efficiency throughput-optimization decoder-only matrix-multiplication associative-algebra causal-masking kv-cached-decoding

Abstract

Fast matrix multiplication algorithms keep the product fixed and search for a cheaper way to evaluate it. We instead ask whether a Transformer's learned projections can use a different, cheaper product altogether. Building on an associative-algebra construction that replaces ordinary matrix multiplication with a sparser interaction table over the same weight blocks, we construct a family with quadratic arithmetic in the matrix dimension when the physical block size remains fixed, and derive finite-shape constraints for GPU execution. The construction is provably optimal for its bilinear rank by the Alder--Strassen bound and can be realized as row-typed rectangular projections compatible with causal masking and KV-cached decoding. We provide an empirical test of this approach by training two approximately 110M-parameter decoder-only Transformer LMs from the same recipe and 12.3B-token budget, differing only in their feed-forward layer: one uses ordinary dense matrix multiplication and the other uses the associative-algebra product. Across four prompt domains, the algebraic model achieves a 6.2--7.8\% increase in end-to-end generation throughput, while obtaining lower scores on all three reported downstream metrics. We treat these results as a feasibility and trainability check for the proposed approach at small scale, leaving further investigation to future work.

한국어 요약

한 줄 요약

Transformer의 행렬 곱셈 규칙을 대수적 구조로 대체하여 연산량을 줄이며 생성 속도를 6.2–7.8% 향상시킨다.

핵심 기여도

핵심 아이디어

기존 Transformer는 행렬 곱셈 `Y = XW`를 기본으로 하며, 이는 행과 열의 블록 간 곱셈 규칙(`row–column rule`)에 의존한다. 본 연구는 이 규칙 자체를 **associative algebra**로 대체함으로써, 동일한 가중치 블록을 사용하면서도 **더 적은 연산량**으로 동작하는 새로운 곱셈 구조를 제안한다.

예를 들어, `q = 2`인 경우, 기존 8개의 block GEMM 대신 **6개의 block GEMM**만 사용하는 `𝒬₂`라는 곱셈 규칙을 정의한다. 이는 특정 블록 간 곱셈(`UW_v`, `W_uA`)을 제거함으로써 달성되며, **off-diagonal cycle**을 닫지 않도록 설계된다.

이 새로운 규칙은 **associative unital algebra**의 성질을 만족하며, 이는 **compositionality**를 보장한다. 즉, `Φ_W(X) := X ⋆₂ W` 형태의 선형 변환은 여러 레이어를 통해 합성되더라도 동일한 형태를 유지한다.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용