SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.10914 · 2024

Towards Better Multi-head Attention via Channel-wise Sample Permutation

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2410.10914.json · badge: /api/ran/2410.10914.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
dashenzi721/csp canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
distributed_init Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dashenzi721/csp/lra/mega_csp/fairseq/distributed_utils.py
pointer only (licence: NONE) · get_code("07969f7041022050")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dashenzi721/csp when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_master Ran
ran, violated the contract we drafted
dashenzi721/csp/lra/mega_csp/fairseq/distributed_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from agi-content-generation/EKD, is pointer only (licence: NOASSERTION) · get_code("90b79fe15491de83")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dashenzi721/csp when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

safe_readline Ran
ran; our contract draft was wrong, not the code
dashenzi721/csp/lra/mega_csp/fairseq/binarizer.py
pointer only (licence: NONE); the stored copy get_code serves, from agi-content-generation/EKD, is pointer only (licence: NOASSERTION) · get_code("82bdf940665aeeb4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dashenzi721/csp when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

url_to_filename Ran
ran; our contract draft was wrong, not the code
dashenzi721/csp/lra/mega_csp/fairseq/file_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from agi-content-generation/EKD, is pointer only (licence: NOASSERTION) · get_code("9418b43048e4e4ec")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dashenzi721/csp when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

all_reduce Not yet run
unverified (harvested, no recorded run)
dashenzi721/csp/lra/mega_csp/fairseq/distributed_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from agi-content-generation/EKD, is pointer only (licence: NOASSERTION) · get_code("199e96db5edd0edd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dashenzi721/csp when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

filename_to_url Not yet run
unverified (harvested, no recorded run)
dashenzi721/csp/lra/mega_csp/fairseq/file_utils.py
pointer only (licence: NONE) · get_code("b1a033619f614e17")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dashenzi721/csp when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_archive_file Not yet run
unverified (harvested, no recorded run)
dashenzi721/csp/lra/mega_csp/fairseq/file_utils.py
pointer only (licence: NONE) · get_code("bd3fe80662b28bc7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dashenzi721/csp when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 6 later) and 0 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.

FunctionAlso present inEarliest-datedOthers named
safe_readline 66 other papers
63 dated earlier, 2 later, 1 same year, order not determinable
1610.02424 (2016-10)
Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models
1802.06901 (2018-02)
Deterministic Non-Autoregressive Neural Sequence Modeling by Iterative Refinement
1904.01038 (2019-04)
FAIRSEQ: A Fast, Extensible Toolkit for Sequence Modeling
and 63 more not named here
url_to_filename 48 other papers
44 dated earlier, 3 later, 1 same year, order not determinable · 8 only as an assembly brick
1610.02424 (2016-10)
Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 45 more not named here
is_master 18 other papers
16 dated earlier, 1 later, 1 same year, order not determinable
1610.02424 (2016-10)
Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models
1902.01388 (2019-02)
Re-examination of the Role of Latent Variables in Sequence Modeling
2004.14524 (2020-04)
Simulated Multiple Reference Training Improves Low-Resource Machine Translation
and 15 more not named here
all_reduce 16 other papers
14 dated earlier, 1 later, 1 same year, order not determinable
1610.02424 (2016-10)
Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models
2021.findings-emnlp.366 (2021 (year only))
Rethinking Zero-shot Neural Machine Translation: From a Perspective of Latent Variables
2104.08771 (2021-04)
Cross-Attention is All You Need: Adapting Pretrained Transformers for Machine Translation
and 13 more not named here
filename_to_url 12 other papers
10 dated earlier, 2 later
1610.02424 (2016-10)
Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models
2007.07691 (2020-07)
A Multilingual Parallel Corpora Collection Effort for Indian Languages
2021.findings-emnlp.366 (2021 (year only))
Rethinking Zero-shot Neural Machine Translation: From a Perspective of Latent Variables
and 9 more not named here
load_archive_file 12 other papers
10 dated earlier, 2 later
1610.02424 (2016-10)
Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models
2021.findings-emnlp.366 (2021 (year only))
Rethinking Zero-shot Neural Machine Translation: From a Perspective of Latent Variables
2104.08771 (2021-04)
Cross-Attention is All You Need: Adapting Pretrained Transformers for Machine Translation
and 9 more not named here
distributed_init 7 other papers
6 dated earlier, 1 same year, order not determinable
1610.02424 (2016-10)
Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models
2105.12967 (2021-05)
Selective Knowledge Distillation for Neural Machine Translation
2106.01540 (2021-06)
Luna: Linear Unified Nested Attention
and 4 more not named here

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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Transformer plays a central role in many fundamental deep learning models, e.g., the ViT in computer vision and the BERT and GPT in natural language processing, whose effectiveness is mainly attributed to its multi-head attention (MHA) mechanism. In this study, we propose a simple and novel channel-wise sample permutation (CSP) operator, achieving a new structured MHA with fewer parameters and lower complexity. Given an input matrix, CSP circularly shifts the samples of different channels with various steps and then sorts grouped samples of each channel. This operator is equivalent to implicitly implementing cross-channel attention maps as permutation matrices, which achieves linear complexity and suppresses the risk of rank collapse when representing data. We replace the MHA of some representative models with CSP and test the CSP-based models in several discriminative tasks, including image classification and long sequence analysis. Experiments show that the CSP-based models achieve comparable or better performance with fewer parameters and lower computational costs than the classic Transformer and its state-of-the-art variants. The code is available at https://github.com/DaShenZi721/CSP.

For agents

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

get_harvested_code_for_paper("2410.10914")
get_code_for_paper("2410.10914")
have("2410.10914")

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

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

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

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

Connect an agent — have() is free.