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 ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2012.14966")

Code

Syntology Ran 16 of 23 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 5 ran · fixture could not drive it; 9 ran with no contract checked.

By repository: official repository: 23 samples from 1 repository, 16 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

HazyResearch/butterfly officialmentioned in paperpytorch report
HazyResearch/learning-circuits officialmentioned in paperpytorch 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; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
5ran · fixture could not drive it
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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

BbtMultUntied HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · 3b643a65ec60c95f · report
BbtOrthoMultUntied HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · fca125309c2b322a · report
ButterflyMult HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · a4e9c34b65b2f6ad · report
ButterflyMultUntied HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · c51c139065af4d76 · report
ButterflyOrthoMultTied HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · 1a5d3fd2e0f126ae · report
ButterflyOrthoMultUntied HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · 73e59bd4741ab79a · report
ComplexMul HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · e3dd3b51568b948f · report
Conjugate HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · 8aa8af42641ece9f · report
ODOMultUntied HazyResearch/butterfly/butterfly/butterfly.py official repository ran Apache-2.0 (permissive) · 981183f0e2853095 · report
butterfly_mult_torch HazyResearch/butterfly/butterfly/butterfly.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 5e9c9a827b90d7d0 · report
butterfly_mult_untied_torch HazyResearch/butterfly/butterfly/butterfly.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 82f636e827231da2 · report
complex_mul_torch HazyResearch/butterfly/butterfly/butterfly.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 300fc5df893178c7 · report
conjugate_torch HazyResearch/butterfly/butterfly/butterfly.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 4eb8f139ff99f805 · report
cupy2torch HazyResearch/butterfly/butterfly/butterfly.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · c2200840c1a57682 · report
torch2numpy HazyResearch/butterfly/butterfly/butterfly.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 76afe345657ec2e7 · report
twiddle_normal_to_fast_format HazyResearch/butterfly/butterfly/butterfly.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · a34cfa6d6cd92765 · report
Butterfly HazyResearch/butterfly/butterfly/butterfly.py official repository unverified Apache-2.0 (permissive) · 56595d236ed87939 · report
bbt_mult_untied HazyResearch/butterfly/butterfly/butterfly.py official repository unverified Apache-2.0 (permissive) · 412f0f9356fe1fd3 · report
bbt_ortho_mult_tied HazyResearch/butterfly/butterfly/butterfly.py official repository unverified Apache-2.0 (permissive) · 7b7f6728bc8598c3 · report
bbt_ortho_mult_untied HazyResearch/butterfly/butterfly/butterfly.py official repository unverified Apache-2.0 (permissive) · 03a76b8c72275a32 · report
butterfly_ortho_mult_tied HazyResearch/butterfly/butterfly/butterfly.py official repository unverified Apache-2.0 (permissive) · 719a1fad21bbecd3 · report
butterfly_ortho_mult_untied HazyResearch/butterfly/butterfly/butterfly.py official repository unverified Apache-2.0 (permissive) · 3367888f332b5167 · report
torch2cupy HazyResearch/butterfly/butterfly/butterfly.py official repository unverified Apache-2.0 (permissive) · 93fe676e4bff5eb2 · report

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