arXiv:2610.31913cs.LGOct 2026

Manuscript Offprint

arXiv:2610.31913

Decode Late, Multiply Once: Rethinking the Dot Product for Quantized Weights

Jonathan Tapson

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large neural networks, and large language models in particular, are increasingly deployed with very low-resolution weights (1–4 bits) while activations remain at 16 or 32 bits. We show that the dot products at the heart of such workloads can be reorganized so that elementwise multiplications are almost entirely removed. For a vector of length n and weights quantized to k bits, a conventional dot product needs n weight decodes, n multiplications and n additions. In the add-before-multiply (“scatter-accumulate”) refactoring, each weight code is used directly as an address offset that selects one of 2k2^k accumulators; each activation is added into the selected accumulator, and the 2k2^k accumulated sums are decoded and multiplied only once, at the end, in a fused decode-and-multiply step. The cost becomes n+2kn + 2^k additions (the 2k2^k products must still be summed), 2k2^k decodes and 2k2^k multiplications, and the decoded weight vector is never formed, which also shrinks local weight memory by up to wd/kw_d/k for wdw_d-bit decoded weights. The reformulation is exact for integer arithmetic, is agnostic to integer or floating-point operands, accommodates arbitrary (including nonlinear) decoding, and extends to matrix and tensor products. We derive the method, give a cost model and worked example, and describe a hardware realization: a scatter-accumulate processing element (SA-PE) that replaces the MAC unit of a weight-stationary systolic array, with a four-phase load/stream/reduce/drain schedule in which a small, time-shared multiplier is used only 2k2^k times per tile. We give a local-memory model, report an RTL implementation with FPGA-flow sizing against a matched MAC array (the unshared SA-PE is larger than a MAC PE; the saving appears when the reduction multiplier is shared), report numerical-accuracy and functional experiments on software models, and discuss limitations and related prior work on weight sharing and lookup-based kernels.

1 Introduction

A recent development in AI is the use of low-resolution (1–4 bit) weights in very large neural networks, such as the foundation models behind modern LLMs [1, 8]. The inference throughput of these models is generally limited by the rate at which weights can be loaded from memory, so low-resolution weights allow more weights to be delivered in a given time at fixed memory bandwidth.

The resulting workload is one in which a processing unit mostly multiplies a low-resolution weight (say 1–4 bits) by a high-resolution activation or other data variable (say 16 or 32 bits). These calculations normally take the form of large matrix or tensor multiplications, at the core of which are dot products: two vectors, which may be rows or columns of a matrix or tensor, are combined to produce a scalar. When optimizing matrix computation in a CPU, GPU or NPU, the best results require the minimum movement of data, the minimum use of local memory, and the minimum number of computations. Multipliers are the most expensive of the arithmetic units involved [2], yet in a low-bit-weight setting most of their capability is wasted: a k-bit weight takes only 2k2^k distinct values, so a long dot product multiplies the activations by the same few numbers over and over.

This paper describes a way of computing such dot products that exploits this repetition. The method works whether the weights are integer or floating-point encoded and whether the data variables are integer or floating-point encoded. A conventional dot product between a weight vector of resolution k bits and a data vector of arbitrary resolution, each of length n, requires n multiply-accumulate (MAC) operations, i.e. n multiplications and n additions. The new method decodes late: activations are summed by code first, and decoding and multiplication are fused into one step per bin, so it requires 2k2^k decodes, 2k2^k multiplications and n+2kn + 2^k additions (the 2k2^k products must still be summed). Since kk is usually 1–4 and nn may exceed 1000, the number of multiplications falls by n/2kn/2^k, which can exceed 100×100 \times; there is a gain for any computation in which 2k≪n2^k \ll n. Because the nn additions remain, the achievable energy gain is bounded by the cost ratio of a decode–multiply–accumulate to a plain accumulate; we quantify this in Section 4.

Relation to prior work and contributions. Related ideas exist. Weight-shared CNN accelerators bin inputs by weight index and multiply the bins by shared weights [3, 4]; UCNN factorizes dot products over repeated weights [5]; lookup-table kernels such as LUT-GEMM and T-MAC replace multiplications in low-bit LLM inference [6, 7]; and ternary models such as BitNet b1.58 reduce multiplication to addition by construction [8]. We do not claim the identity is new. Our contributions are (i) extending it to floating-point operands and group-scaled decoders, stated for matrix and tensor products, and, as we read [5], without the weight sorting and index metadata that UCNN uses to exploit repeated weights, and beyond the fixed-point CNN setting of [3, 4] (Sections 3 to 6); (ii) integrating a scatter-accumulate processing element (SA-PE) as a drop-in node of an otherwise unchanged weight-stationary systolic array, with its load/stream/reduce/drain schedule, time-shared reduction engine, and closed-form sizing and local-memory models (Sections 7 and 8); and (iii) validation of exactness, floating-point rounding error and operation counts, plus RTL sizing against a matched MAC array (Sections 9 and 10).