Papers › Kaleidoscope: An Efficient, Learnable Representation For All Structured Linear Maps

Kaleidoscope: An Efficient, Learnable Representation For All Structured Linear Maps

29 Dec 2020ICLR 2020 1arXiv:2012.14966archive 2025-07-28

Tri Dao, Nimit S. Sohoni, Albert Gu, Matthew Eichhorn, Amit Blonder, Megan Leszczynski, Atri Rudra, Christopher Ré

Modern neural network architectures use structured linear transformations, such as low-rank matrices, sparse matrices, permutations, and the Fourier transform, to improve inference speed and reduce memory usage compared to general linear maps. However, choosing which of the myriad structured transformations to use (and its associated parameterization) is a laborious task that requires trading off speed, space, and accuracy. We consider a different approach: we introduce a family of matrices called kaleidoscope matrices (K-matrices) that provably capture any structured matrix with near-optimal space (parameter) and time (arithmetic operation) complexity. We empirically validate that K-matrices can be automatically learned within end-to-end pipelines to replace hand-crafted procedures, in order to improve model quality. For example, replacing channel shuffles in ShuffleNet improves classification accuracy on ImageNet by up to 5%. K-matrices can also simplify hand-engineered pipelines -- we replace filter bank feature computation in speech data preprocessing with a learnable kaleidoscope layer, resulting in only 0.4% loss in accuracy on the TIMIT speech recognition task. In addition, K-matrices can capture latent structure in models: for a challenging permuted image classification task, a K-matrix based representation of permutations is able to learn the right latent structure and improves accuracy of a downstream convolutional model by over 9%. We provide a practically efficient implementation of our approach, and use K-matrices in a Transformer network to attain 36% faster end-to-end inference speed on a language translation task.

PaperPDFConference PDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 23 code samples harvested from 1 repository linked to this paper: 16 ran (of which 9 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 7 where Syntology's instrument failed) · 7 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; 5 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 23 samples from 1 repository, 16 ran (9 with no instrument failure; 7 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

HazyResearch/butterfly officialmentioned in paperpytorchSyntology: 23 samples, 16 ran (7 instrument-failed) · 7 unverified report
HazyResearch/learning-circuits officialmentioned in paperpytorchSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

23 samples harvested: 16 ran (of which 9 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 7 where Syntology's instrument failed) · 7 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · our draft was wrong
5ran; the contract check could not run
9ran
7unverified

Licence: 0 of the 23 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from HazyResearch/butterfly. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

HazyResearch/butterfly official repository 23 samples, 16 ran (7 instrument-failed) · 7 unverified
BbtMultUntied butterfly/butterfly.py ran Apache-2.0 (permissive) · 3b643a65ec60c95f · report fixture: returned BbtMultUntied · level recorded 2026-09-22
BbtOrthoMultUntied butterfly/butterfly.py ran Apache-2.0 (permissive) · fca125309c2b322a · report fixture: returned BbtOrthoMultUntied · level recorded 2026-09-22
ButterflyMult butterfly/butterfly.py ran Apache-2.0 (permissive) · a4e9c34b65b2f6ad · report fixture: returned ButterflyMult · level recorded 2026-09-22
ButterflyMultUntied butterfly/butterfly.py ran Apache-2.0 (permissive) · c51c139065af4d76 · report fixture: returned ButterflyMultUntied · level recorded 2026-09-22
ButterflyOrthoMultTied butterfly/butterfly.py ran Apache-2.0 (permissive) · 1a5d3fd2e0f126ae · report fixture: returned ButterflyOrthoMultTied · level recorded 2026-09-22
ButterflyOrthoMultUntied butterfly/butterfly.py ran Apache-2.0 (permissive) · 73e59bd4741ab79a · report fixture: returned ButterflyOrthoMultUntied · level recorded 2026-09-22
ComplexMul butterfly/butterfly.py ran Apache-2.0 (permissive) · e3dd3b51568b948f · report fixture: returned ComplexMul · level recorded 2026-09-22
Conjugate butterfly/butterfly.py ran Apache-2.0 (permissive) · 8aa8af42641ece9f · report fixture: returned Conjugate · level recorded 2026-09-22
ODOMultUntied butterfly/butterfly.py ran Apache-2.0 (permissive) · 981183f0e2853095 · report fixture: returned ODOMultUntied · level recorded 2026-09-22
butterfly_mult_torch butterfly/butterfly.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) · 5e9c9a827b90d7d0 · report fixture: signature twiddle:Tensor/4/float, input:Tensor/3/float, increasing_stride:bool/0/bool, return_intermediates:bool/0/bool · returned Tensor · level recorded 2026-09-22
butterfly_mult_untied_torch butterfly/butterfly.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) · 82f636e827231da2 · report fixture: signature twiddle:Tensor/6/float, input:Tensor/4/float, increasing_stride:bool/0/bool, return_intermediates:bool/0/bool · returned Tensor · level recorded 2026-09-22
complex_mul_torch butterfly/butterfly.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) · 300fc5df893178c7 · report fixture: signature X:Tensor/3/float, Y:Tensor/3/float · returned Tensor · level recorded 2026-09-22
conjugate_torch butterfly/butterfly.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) · 4eb8f139ff99f805 · report fixture: signature X:Tensor/3/float · returned Tensor · level recorded 2026-09-22
cupy2torch butterfly/butterfly.py ran; the contract check could not run (DEP_MISSING) Apache-2.0 (permissive) · c2200840c1a57682 · report fixture: signature tensor:MockCupyTensor/0/? · returned Tensor · level recorded 2026-09-22
torch2numpy in 6 papers butterfly/butterfly.py ran · our draft was wrong Apache-2.0 (permissive) · 76afe345657ec2e7 · report fixture: signature X:Tensor/2/float · returned ndarray · level recorded 2026-09-22
twiddle_normal_to_fast_format butterfly/butterfly.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · a34cfa6d6cd92765 · report fixture: signature twiddle:Tensor/5/float · returned Tensor · level recorded 2026-09-22
Butterfly butterfly/butterfly.py unverified Apache-2.0 (permissive) · 56595d236ed87939 · report
bbt_mult_untied butterfly/butterfly.py unverified Apache-2.0 (permissive) · 412f0f9356fe1fd3 · report
bbt_ortho_mult_tied butterfly/butterfly.py unverified Apache-2.0 (permissive) · 7b7f6728bc8598c3 · report
bbt_ortho_mult_untied butterfly/butterfly.py unverified Apache-2.0 (permissive) · 03a76b8c72275a32 · report
butterfly_ortho_mult_tied butterfly/butterfly.py unverified Apache-2.0 (permissive) · 719a1fad21bbecd3 · report
butterfly_ortho_mult_untied butterfly/butterfly.py unverified Apache-2.0 (permissive) · 3367888f332b5167 · report
torch2cupy butterfly/butterfly.py unverified Apache-2.0 (permissive) · 93fe676e4bff5eb2 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Kaleidoscope matrices (K-matrices) (graph method: Kaleidoscope matrices (K-matrices)). 23 bricks; individually on a fixture: 16 ran (of which 9 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 7 where Syntology's instrument failed) · 7 unverified. The assembly has not been run end-to-end.

  1. Butterfly entry · level 0 · unverified · 56595d236ed87939
  2. bbt_mult_untied helper · level 0 · unverified · 412f0f9356fe1fd3
  3. bbt_ortho_mult_tied helper · level 0 · unverified · 7b7f6728bc8598c3
  4. bbt_ortho_mult_untied helper · level 0 · unverified · 03a76b8c72275a32
  5. butterfly_ortho_mult_tied helper · level 0 · unverified · 719a1fad21bbecd3
  6. butterfly_ortho_mult_untied helper · level 0 · unverified · 3367888f332b5167
  7. twiddle_normal_to_fast_format helper · level 1 · ran · our draft was wrong · a34cfa6d6cd92765
  8. BbtMultUntied helper · level 1 · ran · 3b643a65ec60c95f
  9. BbtOrthoMultUntied helper · level 1 · ran · fca125309c2b322a
  10. ButterflyOrthoMultTied helper · level 1 · ran · 1a5d3fd2e0f126ae
  11. ButterflyOrthoMultUntied helper · level 1 · ran · 73e59bd4741ab79a
  12. ButterflyMult helper · level 1 · ran · a4e9c34b65b2f6ad
  13. ButterflyMultUntied helper · level 1 · ran · c51c139065af4d76
  14. ComplexMul helper · level 1 · ran · e3dd3b51568b948f
  15. Conjugate helper · level 1 · ran · 8aa8af42641ece9f
  16. ODOMultUntied helper · level 1 · ran · 981183f0e2853095
  17. butterfly_mult_torch helper · level 1 · ran; the contract check could not run (RAISES) · 5e9c9a827b90d7d0
  18. butterfly_mult_untied_torch helper · level 1 · ran; the contract check could not run (RAISES) · 82f636e827231da2
  19. complex_mul_torch helper · level 1 · ran; the contract check could not run (RAISES) · 300fc5df893178c7
  20. conjugate_torch helper · level 1 · ran; the contract check could not run (RAISES) · 4eb8f139ff99f805
  21. cupy2torch helper · level 1 · ran; the contract check could not run (DEP_MISSING) · c2200840c1a57682
  22. torch2cupy helper · level 0 · unverified · 93fe676e4bff5eb2
  23. torch2numpy helper · level 1 · ran · our draft was wrong · 76afe345657ec2e7

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2012.14966") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

AllImage ClassificationSpeech Recognitionimage-classificationspeech-recognition

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

1x1 ConvolutionAbsolute Position EncodingsAdamAttentionAverage PoolingBPEBatch NormalizationChannel ShuffleConvolutionDense ConnectionsDepthwise ConvolutionDropoutGlobal Average PoolingGrouped ConvolutionGroupwise Point ConvolutionLabel SmoothingLayer NormalizationLinear LayerMax PoolingMulti-Head AttentionPointwise ConvolutionPosition-Wise Feed-Forward LayerReLUResidual ConnectionShuffleNetShuffleNet BlockSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections