Papers › Multiplication-Free Transformer Training via Piecewise Affine Operations

Multiplication-Free Transformer Training via Piecewise Affine Operations

26 May 2023NeurIPS 2023 11arXiv:2305.17190archive 2025-07-28

Atli Kosson, Martin Jaggi

Multiplications are responsible for most of the computational cost involved in neural network training and inference. Recent research has thus looked for ways to reduce the cost associated with them. Inspired by Mogami (2020), we replace multiplication with a cheap piecewise affine approximation that is achieved by adding the bit representation of the floating point numbers together as integers. We show that transformers can be trained with the resulting modified matrix multiplications on both vision and language tasks with little to no performance impact, and without changes to the training hyperparameters. We further replace all non-linearities in the networks making them fully and jointly piecewise affine in both inputs and weights. Finally, we show that we can eliminate all multiplications in the entire training process, including operations in the forward pass, backward pass and optimizer update, demonstrating the first successful training of modern neural network architectures in a fully multiplication-free fashion.

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="2305.17190")

Code

Syntology Ran 5 of 19 code samples harvested from 1 repository linked to this paper; 14 have no recorded run. Of those that ran: 3 ran · honoured contract; 2 ran with no contract checked.

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

epfml/piecewise-affine-multiplication officialmentioned in papermentioned on GitHubpytorchApache-2.0 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

19 samples harvested; 5 ran; 3 honoured the contract we drafted; 14 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.

3ran · honoured contract
2ran
14unverified

Licence: 0 of the 19 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 epfml/piecewise-affine-multiplication. “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.

count_params epfml/piecewise-affine-multiplication/submodules/timm/benchmark.py official repository ran · honoured contract Apache-2.0 (permissive) · 410bffb8a07b52e3 · report
checkpoint_metric epfml/piecewise-affine-multiplication/submodules/timm/avg_checkpoints.py official repository ran fingerprinted Apache-2.0 (permissive) · 33bca8cbc866bf64 · report
cuda_timestamp epfml/piecewise-affine-multiplication/submodules/timm/benchmark.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 50d653ee6a59955c · report
find_version epfml/piecewise-affine-multiplication/submodules/fairseq/release_utils.py official repository ran Apache-2.0 (permissive) · d4192f5e85770fdd · report
timestamp epfml/piecewise-affine-multiplication/submodules/timm/benchmark.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 475160c5a1a1225a · report
check_row_major epfml/piecewise-affine-multiplication/pam/cuda_bindings.py official repository unverified Apache-2.0 (permissive) · 253be6c0ef2fe548 · report
cross_entropy epfml/piecewise-affine-multiplication/pam/pam_opt.py official repository unverified Apache-2.0 (permissive) · 7e941323d268d90d · report
demote_tensor epfml/piecewise-affine-multiplication/pam/utils.py official repository unverified Apache-2.0 (permissive) · 30174a8ded3bfc64 · report
div epfml/piecewise-affine-multiplication/pam/pam_ops.py official repository unverified Apache-2.0 (permissive) · ab41ea0c2bcafe1e · report
exp epfml/piecewise-affine-multiplication/pam/pam_ops.py official repository unverified Apache-2.0 (permissive) · 8414688e931a8025 · report
get_exp_mantissa epfml/piecewise-affine-multiplication/pam/native.py official repository unverified Apache-2.0 (permissive) · 88cf61b729ed21dd · report
get_next_version epfml/piecewise-affine-multiplication/submodules/fairseq/release_utils.py official repository unverified Apache-2.0 (permissive) · 44b6e8848744468f · report
get_norm epfml/piecewise-affine-multiplication/shared/modules/normalization.py official repository unverified Apache-2.0 (permissive) · a578037399ac5710 · report
mul epfml/piecewise-affine-multiplication/pam/pam_ops.py official repository unverified Apache-2.0 (permissive) · 85332a013577bdd1 · report
pa_exp2_fwd epfml/piecewise-affine-multiplication/pam/native.py official repository unverified Apache-2.0 (permissive) · aec5df54dd4ceba5 · report
pa_log2_fwd epfml/piecewise-affine-multiplication/pam/native.py official repository unverified Apache-2.0 (permissive) · 6411768e64113a79 · report
torch_log_softmax2 epfml/piecewise-affine-multiplication/pam/pam_experimental.py official repository unverified Apache-2.0 (permissive) · 68c33c7d589f43b4 · report
torch_logsumexp2 epfml/piecewise-affine-multiplication/pam/pam_experimental.py official repository unverified Apache-2.0 (permissive) · 3bd7633c5b60762e · report
torch_softmax2 epfml/piecewise-affine-multiplication/pam/pam_experimental.py official repository unverified Apache-2.0 (permissive) · 112d967966670abf · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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