WorksComputer Science
Decode Late, Multiply Once: Rethinking the Dot Product for Quantized Weights
Abstract
Large neural networks are increasingly deployed with 1-4 bit weights and 16- or 32-bit activations, yet their dot products still use one multiplier per element. We show that a length-n dot product with k-bit weight codes can be computed with n+2^k additions and at most 2^k decodes and 2^k multiplications. Each weight code is used directly as an address offset that selects one of 2^k accumulators; each activation is added into the selected accumulator; and the accumulated sums are decoded and multiplied only once, at the end, in a fused decode-and-multiply step. The decoded weight vector is never formed. The refactoring is exact for integer arithmetic, works with integer or floating-point operands and with arbitrary, including nonlinear, decoders, and extends to group-wise scales and to matrix and tensor products. The multiplier count falls by n/2^k, while total arithmetic energy improves by a smaller, bounded factor that we quantify with a cost model. We describe a scatter-accumulate processing element (SA-PE) that replaces the MAC unit in a weight-stationary systolic array, with a load/stream/reduce/drain schedule in which a small, time-shareable multiplier runs only 2^k times per tile. Because decoded weights are not stored, local weight memory shrinks by up to w_d/k for w_d-bit decoded weights. An RTL implementation synthesized for FPGA and compared with a matched MAC array shows that an unshared SA-PE is larger than a MAC PE, and that the saving appears when the reduction multiplier is shared across PEs. Software models confirm exact integer equivalence and floating-point error no worse than the conventional pipeline. We do not claim the underlying identity is new, and we discuss related work on weight sharing and lookup-based kernels.
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 -bit weight takes only 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 bits and a data vector of arbitrary resolution, each of length , requires multiply-accumulate (MAC) operations, i.e. multiplications and 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 decodes, multiplications and additions (the products must still be summed). Since is usually 1–4 and may exceed 1000, the number of multiplications falls by , which can exceed ; there is a gain for any computation in which . Because the 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 § 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] (§ 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 (§ 7 and § 8); and (iii) validation of exactness, floating-point rounding error and operation counts, plus RTL sizing against a matched MAC array (§ 9 and § 10).
Background and Notation
The dot product of two vectors and of length is
When the elements of have a low resolution of bits, they take only distinct values, which we write as integer weight codes . Many AI algorithms exploit quantized weights by scaling them after they are loaded, so that each code is mapped to a more precise value; the mapping may be linear (scale and offset), a nonlinear function, or an arbitrary table. We represent it by a decoding vector of precise coefficients: a code is replaced by . The mapping may be computed as for a linear or nonlinear decoding function , or stored as a lookup table addressed by the code. Any such mapping is compatible with the method below.
The conventional computation begins with a decoding step that turns into a vector of precise weights, , and then evaluates
requiring decode (lookup) operations, multiplications, additions, and storage for or a pipeline that produces it on the fly. We call the activations, whatever its role in the network.
The Add-Before-Multiply Method
Refactoring
All the elements of that share a code are multiplied by the same coefficient, so the corresponding elements of can be added together first and multiplied once. Define the accumulated group values (bin sums)
with the empty sum equal to zero.
Proposition 1. For all as above, .
Algorithm 1 Conventional vs. add-before-multiply dot product. Inputs: codes , data , decode table .
Conventional
for to do ▷ parallelizable
▷ decode
▷ MAC
end for
return
Add-before-multiply
for to do ▷ parallelizable
▷ add at offset
end for
for to do
end for
return
Proof. Partition by the value of . Then by the distributive law.
Written out in full,
The number of multiplications and of decoding operations drops from to at most (fewer if only some codes occur in the vector and empty bins are skipped). The number of additions stays at , plus at most to combine the weighted bins. What is introduced is the need to classify the elements of by the corresponding code.
Weight codes as addresses
One way to classify is to expand each -bit code into a -bit one-hot mask that gates the activation into the matching accumulator. This is simple, but costs one mask-generation operation per element and a mask-directed selection network. It is unnecessary: the code can be used directly as a binary address, or as an offset from a base address, of the accumulator in which its activation is summed. For there are four codes and four bin sums, held in four registers at and selected by . The decoder can be a -bit passthrough or a small adder; no comparator or classifier is involved. Algorithm 1 gives the conventional and new procedures, and Figure 1 shows the dataflow.

Figure 1. Dataflow of the conventional and add-before-multiply dot products. In (b) the -element decoded vector and the products are never formed; only bin sums are held.
Delayed decoding, and two corollaries
Decoding is delayed: the codes are used directly during the long accumulation loop, and the coefficients are fetched or computed only for the bins afterwards. The storage that would hold the high-precision is saved; is never needed. The coefficient may come from a lookup table, a linear decoding function, or a nonlinear decoding function, and the three give identical results for a given code set.
Group-wise scales. Practical quantization schemes often give each group of consecutive weights its own decode vector (a block scale, and possibly an offset). The method applies per group, with multiplications in total; the advantage then requires rather than .
One bin is redundant. Because depends only on the activations, one bin (say ) can be recovered as . When one activation vector is multiplied by many weight rows, is computed once and shared. For this means only elements with need be accumulated.
Cost Model
Let , , denote the energy (or latency, or area-delay product) of one decode, one multiplication and one accumulation, and the cost of forming the -bit address offset for a bin update (about a -bit integer addition, often absorbed in the addressing hardware). Table 1 lists operation counts per dot product, including the one-hot variant.
| Conventional | One-hot masked | Direct address offset | |
| Decode / mask generation | decodes | masks | (offset only) |
| Coefficient decodes | |||
| Multiplications | |||
| Accumulator updates | |||
| Address-offset ops (-bit) | |||
| Decoded-weight storage | values | coefficients | coefficients |
| Accumulation locations |
Table 1. Operation counts for one length- dot product with -bit weight codes. Counts are upper bounds if empty bins are skipped.
Taking the bin additions to cost the same as a conventional accumulation, the energy ratio is
With and neglected, . The multiplier count falls by exactly , but the total arithmetic gain saturates at . For floating-point operands a multiplier typically costs several times an adder [2], so between 2 and 8 is a reasonable range for exploration (Figure 2); for example () to 8.7 () at , . The headline “more than 100×” therefore refers to the number of multiplications; the energy of the arithmetic falls by a factor approaching , with larger gains where multipliers or lookups are comparatively expensive (wide floating-point formats, nonlinear decoders) or where the removed decoded-weight storage and traffic are significant. The saving also appears as area and switching activity: the per-cycle datapath needs an adder and a small accumulator file rather than a multiplier.

Figure 2. Arithmetic energy gain from Eq. (5) with . The curves saturate at once .
Worked Example
Take , , activations , codes and a nonlinear decode vector . Conventionally, the codes are decoded to , ten products are formed and summed: ten lookups, ten multiplications, ten additions, ten stored FP16 values, result 1.0614.
With add-before-multiply, Table 2 shows the streaming phase: in each cycle one activation is added to the bin addressed by its code. The bins end at , and the reduction gives
| cycle | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| .12 | .34 | .45 | .56 | .78 | .90 | .01 | .23 | .45 | .67 | |
| code | 2 | 1 | 3 | 1 | 0 | 2 | 3 | 2 | 1 | 0 |
| update | ||||||||||
| bin | 0 | 1 | 2 | 3 | ||||||
| accumulated | 1.45 | 1.35 | 1.25 | 0.46 | ||||||
| coefficient | .06 | .11 | .37 | .79 | ||||||
| product | .0870 | .1485 | .4625 | .3634 |
Table 2. Stream-phase scatter trace and reduce-phase products for the worked example (, ).
using ten bin updates, four decodes, four multiplications and four further additions, and holding only four values. The two results agree.
Matrix and Tensor Products
Any matrix multiplication decomposes into dot products, so the method applies element by element. Let be the activation matrix and the weight-code matrix with decode vector . For each output element and each code there is an accumulator
i.e. is added into whenever , and the decode and multiply happen once per output element, after the -element accumulation. The result equals the product with the decoded matrix , but is never formed. The same holds for tensor contractions: the selected numerical values and codes participating in one output element are accumulated by code. A matrix–vector product with weight codes needs accumulations and multiplications. Per output element the bin storage is accumulators, so the aggregate storage scales with the number of output elements processed concurrently—the design trade-off addressed by the weight-stationary schedule below.
Hardware Realization
The scatter-accumulate processing element
A scatter-accumulate processing element (SA-PE, Figure 3) replaces the per-cycle multiplication of a conventional MAC element by a per-cycle address-selected accumulation, and defers all multiplication until accumulation is complete. It comprises: a weight-code storage structure holding the code set for the current weight-stationary period, optionally double-buffered so the next period’s codes load while the current one runs; an address decoder producing a selection signal from the selected code (a -to- one-hot decode, or base-plus-offset address generation, in the extreme a -bit passthrough); a write-select circuit (decoded per-bin write enables, a demultiplexer, or a decoded register-file or SRAM write address) that steers the incoming activation to the selected bin; an adder that adds it to the value held in that bin; a bin accumulator bank of locations; a -entry decode LUT (or decoding-function evaluator); and a reduction unit that forms and presents it as the PE’s partial sum; it fuses decode and multiply, since the decoded coefficient feeds the multiplier directly and the operation runs only times per tile. Signed codes are handled entirely in the decode LUT, so the address path operates only on unsigned -bit codes. In the streaming datapath each cycle performs one address-selected add; the multiplier is not in the loop.
Figure 3. Scatter-accumulate processing element. During streaming, the stored code selects a bin and the adder updates it; during the reduce phase the reduction unit multiplies each bin by its decoded coefficient and sums.
Weight-stationary systolic array
SA-PEs can replace the MAC unit at each node of a conventional weight-stationary systolic array (Figure 4); array-level control, tiling and interconnect of an existing design can be reused. Weight codes are loaded into the PEs once per weight tile and held stationary while activations are streamed. Each output element corresponds to a row of the array; the dot product is split into slices of elements processed by the PEs of that row (), each scatter-accumulating its slice of the activations into its own independently addressed bin bank. In each stream cycle a PE consumes one stationary code, read from its code store, and one activation; the gain needs , since otherwise the bins collect too few terms to amortize the reduction. After a full pass of the activation slice, each PE holds partial bin sums and its reduction unit produces a partial dot product; a conventional row adder chain sums the partial results across the row to produce the output. With rows the array computes output elements per pass. A problem larger than the physical array is partitioned into weight tiles in the usual way, with row-partial results accumulated across tiles in an output accumulator.
Figure 4. Weight-stationary array of SA-PEs. Activation slices are broadcast down columns; the PEs of a row hold codes for the same output element and their partial sums are combined by a row adder chain. (Schematic; array size is arbitrary.)
Schedule
A weight-stationary period has four phases (Figure 5): load (about one cycle: write the code set, initialize bins, load the decode LUT, reset counters), stream ( cycles, one scatter-accumulate per activation), reduce ( cycles of multiply-add in the reduction unit) and drain ( cycles to flush the partial sums of a row through the -stage adder chain). The next tile’s load can overlap the current tile’s work through double buffering. Because , load, reduce and drain are short compared with the stream phase, so throughput is set by one addition per activation per cycle; the period grows only by the reduce cycles relative to a conventional MAC pipeline (6% for , , and 25% for ), unless the reduce phase is overlapped with the next tile’s stream, which requires double-buffered bins. The reduction multiplier runs only times per cycles, so it can be small, clocked slower than the stream path, or time-shared among all PEs of a row or column. A small controller finite-state machine with phase counters (a -bit stream counter and a -bit reduce counter) sequences the phases through load, stream, reduce and drain states, asserting enables such as load-weights, init-bins, stream-enable and reduce-enable.

Figure 5. Phase schedule (not to scale). The load of the next tile overlaps the reduce and drain of the current one; the reduce phase lasts cycles.
Accumulator width and multi-precision design
Bin width. In the worst case all activations of a slice map to one code and sum into a single bin, so a fixed-point bin needs bits, where is the number of activations accumulated into one bin (the slice length in an array); for 16-bit activations and that is ten guard bits. Alternatively the bins can be wider floating-point accumulators (e.g. FP32 for FP16 inputs), as is common practice in accelerators, which avoids bit growth. Multi-precision. A single SA-PE can support to 4 (or more) by parameterizing the bin count and the address-decoder width. A design provisions the maximum bin count (16 for ); at lower the unused bins can be power- or clock-gated. The bin bank, whether registers or SRAM, is the dominant area of the PE, while the multiplier cost is amortized over the stream length regardless of , so the design trade-off is set mainly by bin-bank size rather than arithmetic width. Resource comparison. Table 3 summarizes the per-PE comparison, and Table 4 gives the multiplication reduction .
| Conventional MAC PE | SA-PE | |
| Multiplications per dot product | , independent of | |
| Additions per dot product | accumulator updates | scatter updates + reduce updates |
| Per-cycle streaming operation | 1 multiply + 1 accumulate | 1 address-selected add |
| Extra addressing logic | none | -bit address decode / base+offset |
| Storage per PE | 1 accumulator | bins (width = data + ) |
| Weight storage per PE | decoded weight, or -bit + decode | -bit codes only; decode LUT shared |
Table 3. Per-PE resources for an -length period: conventional MAC systolic PE versus SA-PE.
| mults () | ||||
| 1 | 2 | 128× | 512× | 2048× |
| 2 | 4 | 64× | 256× | 1024× |
| 3 | 8 | 32× | 128× | 512× |
| 4 | 16 | 16× | 64× | 256× |
Table 4. Multiplication reduction factor per PE per tile.
Software and vector processors
The same refactoring runs in software or on SIMD hardware: the loop of Algorithm 1 is efficient on any core with cheap indexed read-modify-write to a small cache-resident table, and the address is formed as a base register plus the code offset. On a vector ISA with indexed stores (e.g. RISC-V vsoxei*), an implementation scatters each activation into a zero-filled VL block at the row given by its code and then reduces the block. Because an indexed store overwrites rather than accumulates, the reduction then also adds the zeros ( VL lane-additions rather than VL), so on such hardware the gain is confined to decode and multiplication; a scatter-accumulate primitive or an accumulator file addressed by the code, as in the SA-PE, recovers the full operation count of Table 1.
Local Memory Reduction
Delayed decoding also shrinks the local weight memory. Consider one PE holding a weight-stationary tile of weights. Let be the decoded-weight width, the bin width, and the number of PEs that share one decode table; activation buffers are identical in all designs and are excluded. Three organizations are compared, with sizes in bits:
Relative to a decoded tile the reduction is
and once . Table 5 gives values for , , FP32 bins () and , and Figure 6 shows . For a row of 32 PEs with 1024-weight slices, 64 KiB of decoded weights becomes 8.8 KiB for or 19 KiB for . Using fixed-point bins of bits instead of FP32, or sharing the decode table across 32 PEs, changes by at most about 5%.
| (B) | (B) | (B) | |||
| 1 | 2048 | 132 | 140 | 14.6 | 1.06 |
| 2 | 2048 | 264 | 280 | 7.3 | 1.06 |
| 4 | 2048 | 544 | 608 | 3.4 | 1.12 |
Table 5. Local weight memory per PE (, , , ).

Figure 6. Memory reduction from Eq. (10) for , , . The curves approach , , ; the thin line marks .
The benefit depends on the baseline. It applies when the conventional design holds decoded weights locally (). If the conventional design instead keeps -bit codes and decodes per element (), scatter-accumulate needs 6–12% more memory for the bins, and its advantage is the removed per-element decode and multiply rather than memory. The saving also requires ; for it vanishes at .
RTL Implementation and Sizing
Design. We implemented the SA-PE and an array in synthesizable Verilog, parameterized by , slice length , activation width , rows and columns . Each PE holds an -bit weight-code memory, signed bins and a multiply-accumulator used only in the reduce phase (bin decode value, accumulated into a partial sum). A bin must hold the sum of activations and so needs at least bits (22 for , ); the RTL adds one guard bit, using (23 bits), which gives a 42-bit partial sum. One -entry decode LUT is shared by the whole array and broadcast during the reduce phase. A six-state controller (idle, flush, stream, reduce, drain, done) with stream, reduce and drain counters sequences each tile, and a registered adder chain sums the PE partial sums of each row over drain cycles.
Verification and baseline. A self-checking testbench loads random codes, a random decode table and random activations into a array and compares each output with an integer decode-then-MAC reference (8 random tiles, no mismatches). As baseline we built a matched MAC array with identical interfaces, code memories, shared LUT and controller (minus the reduce state); its PE decodes and multiplies every element, and it passes the same test. Sharing the structure keeps the comparison confined to the PE datapath.
Per-PE sizing. Both arrays were synthesized with Yosys 0.33 to Xilinx 7-series LUT6 and DSP48E1 primitives (, , ). Table 6 gives per-PE results; the code memory (one RAM64M) is identical in the two designs and is omitted. The last two rows are projections obtained by removing the multiplier from the PE and adding a separately synthesized reduction engine amortized over PEs.
| PE | LUT | FF | DSP48 |
| MAC, multiplier in DSP | 55 | 39 | 1 |
| MAC, multiplier in fabric | 819 | 39 | 0 |
| SA-PE (RTL), multiplier in DSP | 161 | 134 | 1 |
| SA-PE (RTL), multiplier in fabric | 1193 | 134 | 0 |
| SA-PE shared†, DSP engine | 122 | 95 | 0.06 |
| SA-PE shared†, fabric engine | 179 | 95 | 0 |
Table 6. Per-PE FPGA resources (, , , Yosys 0.33). †: projection with the reduction multiplier shared by PEs.
Array sizing. A array (, 12 PEs, DSP-mapped) needs 2368 LUTs, 1807 FFs and 12 DSP48 for the SA array, against 1335 LUTs, 719 FFs and 12 DSP48 for the MAC array.
Interpretation. The unshared SA-PE is larger than a MAC PE (161 versus 55 LUTs and 134 versus 39 FFs with a DSP multiplier) because of the bin bank (92 flip-flops here), the partial-sum register and the bin-select multiplexer, and because it still contains one multiplier. The saving appears only when that multiplier is removed from the PE. A PE without the multiplier needs 119 LUTs and 92 FFs, and a stand-alone reduction engine needs 42 LUTs, 42 FFs and one DSP48 (960 LUTs if the multiplier is built in fabric). Shared by PEs the engine adds about 3 LUTs per PE, so DSP use falls from one per PE to , and with fabric multipliers the per-PE cost falls from 819 LUTs (MAC) to 179, a factor of 4.6.
Sharing limit. Each PE needs only multiplications per cycles, so one multiplier can serve at most PEs: 16 for , , and 4 for , . The implemented RTL keeps one multiplier per PE. Sharing additionally requires the reduction of tile to overlap the stream of tile , which needs double-buffered bins (about 92 more flip-flops per PE); otherwise the reduce phase grows to cycles.
Dependence on . The bin bank grows with $2^k$. At the SA-PE needs 359 LUTs and 412 FFs against 119 LUTs and 39 FFs for the MAC PE, and the serial reduce phase costs cycles per tile: 6% of a 64-cycle stream at $k = 2 and 25% at . The code memory per PE is bits for , , plus the bins, against 1024 bits for a decoded 16-bit tile.
Caveats. These are figures from an open-source FPGA flow. They indicate relative sizing, not ASIC area, power or Vivado results; the sharing figures are projections from synthesized components rather than synthesis of a complete shared design; and the comparison is for the specific datapath widths and parameters listed.
Evaluation by Software Models
Numerical behaviour. For integer activations and integer decoded weights the refactoring is exact, since integer addition is associative and the distributive law holds; we verified this on random 8-bit data (, ). For floating point, reordering the additions changes rounding but not its order of magnitude. We measured this with a model in which are sorted normal variates in FP16, activations are normal in FP16 and codes are uniform; 40 random trials per row, FP64 reference. Table 7 reports the mean error relative to for (i) the conventional method with FP32 multiply-accumulate, (ii) the conventional method with a fully FP16 datapath, (iii) the new method with FP16 bins and (iv) the new method with FP32 bins.
| Conv. FP32 acc. | Conv. FP16 | New, FP16 bins | New, FP32 bins | ||
| 1 | 256 | ||||
| 1 | 4096 | ||||
| 2 | 256 | ||||
| 2 | 4096 | ||||
| 4 | 256 | ||||
| 4 | 4096 |
Table 7. Mean relative error (normalized by ) against an FP64 reference.
At equal accumulator width the new method is no less accurate than the conventional one, and more accurate in the FP16 setting, since the per-element product rounding is removed. Because the bins perform only additions of activations they can be widened cheaply; with FP32 bins the error is roughly an order of magnitude below the FP32 conventional pipeline, since only about rather than roundings occur.
Array-level functional check. We also modelled the tiled weight-stationary organization of § 7: 30 random GEMV configurations (, up to 32 output rows, up to 700, random slice lengths per PE) in FP64 gave a maximum absolute difference of from the reference (), integer-exact results in an INT64 test, and a multiplication count of exactly , confirming the reduction factors of Table 4 (e.g. a 4096 × 4096 GEMV with and 1024-element slices uses 64× fewer multiplications).
These are software emulations on synthetic data, not measurements on silicon or trained networks; end-to-end model accuracy and energy should be confirmed on real hardware.
Discussion
Relation to prior work. Exploiting repeated weights to factor out multiplications is an established idea, and this paper should be read in that context. Weight sharing with codebooks, which creates the few-distinct-values structure used here, was popularized by Deep Compression [1]. Accumulate-then-multiply units for weight-shared CNN accelerators, which bin inputs by weight index and multiply the bins by the shared weights, were proposed by Garland and Gregg [3, 4], and UCNN [5] exploits weight repetition by factorizing dot products and sharing partial sums. A separate, active line of work replaces multiplications in low-bit LLM inference by lookup tables of precomputed activation combinations (LUT-GEMM [6], T-MAC [7]), and ternary-weight models such as BitNet b1.58 [8] reduce multiplications to additions by construction. Relative to these, the formulation here is deliberately general: it handles integer or floating-point operands and linear or nonlinear decoders, uses the weight code itself as the accumulator address so that neither a one-hot mask nor a decoded weight vector is formed, delays decoding until after accumulation, and is packaged as a drop-in PE for weight-stationary arrays with a streaming schedule and multi-precision provisioning. We make no claim that the algebraic identity is new; a detailed comparison with these earlier proposals would be needed to establish precisely where the benefit lies for a given target.
When it helps, and when it does not. The benefit requires (or for group-wise scales), multiplication and decode to be a meaningful part of the cost, and hardware that performs address-selected accumulation cheaply. In memory-bandwidth-bound inference, which motivates low-bit weights, reduced arithmetic does not by itself raise throughput, but the saved multiplier area and switching power can be spent on wider on-chip weight buffers or more parallel PEs within the same budget. Costs include the bin bank (the dominant PE area, wide accumulators per PE), a read-after-write hazard when consecutive activations share a code (requiring forwarding or interleaved bin sets), and, for large , diminishing returns as approaches . The RTL results of § 9 show the first cost concretely: an unshared SA-PE is larger than a MAC PE, so the area benefit depends on sharing the reduction multiplier and on a bin bank that is cheap relative to the multiplier it replaces. The local-memory saving of § 8 likewise applies only against a baseline that stores decoded weights.
Alternatives. For linearly coded weights one can split into bit planes and compute masked sums scaled by powers of two; this needs no multiplications but conditional passes over , versus one pass here, and does not handle nonlinear decoders without an extra step.
Conclusion
Refactoring a low-bit dot product so that activations are added into code-addressed accumulators before any multiplication reduces the multiplier and decode count from to at most , eliminates the decoded weight vector, and keeps the addition count at rather than . A scatter-accumulate PE realizes this in a weight-stationary systolic array with a -cycle reduce phase per tile and a small time-shared multiplier, and an RTL implementation shows the sizing trade-offs against a matched MAC array. The arithmetic gain saturates at the cost ratio of a decode–multiply–accumulate to a plain accumulate, so the method is most attractive where multipliers and decoders are expensive and accumulators can be made wide cheaply. Next steps are ASIC synthesis of the SA-PE and array with a shared reduction engine, to replace the abstract energy model with measured area and power, and evaluation of end-to-end accuracy on quantized models.
References
- [1]S. Han, H. Mao, W. J. Dally. Deep Compression: Compressing deep neural networks with pruning, trained quantization and Huffman coding. ICLR, 2016.arxiv.org/abs/1510.00149
- [2]M. Horowitz. Computing’s energy problem (and what we can do about it). IEEE ISSCC, 2014.
- [3]J. Garland, D. Gregg. Low complexity multiply accumulate unit for weight-sharing convolutional neural networks. IEEE Computer Architecture Letters, 2017 (arXiv:1609.05132).DOI
- [4]J. Garland, D. Gregg. Low complexity multiply-accumulate units for convolutional neural networks with weight-sharing. ACM Trans. Architecture and Code Optimization, 15(3), 2018 (arXiv:1801.10219).arxiv.org/abs/1801.10219
- [5]K. Hegde, J. Yu, R. Agrawal, M. Yan, M. Pellauer, C. W. Fletcher. UCNN: Exploiting computational reuse in deep neural networks via weight repetition. ISCA, 2018.arxiv.org/abs/1804.06508
- [6]G. Park et al. LUT-GEMM: Quantized matrix multiplication based on LUTs for efficient inference in large-scale generative language models. arXiv:2206.09557, 2022.arxiv.org/abs/2206.09557
- [7]J. Wei et al. T-MAC: CPU renaissance via table lookup for low-bit LLM deployment on edge. arXiv:2407.00088, 2024.DOI
- [8]S. Ma et al. The era of 1-bit LLMs: All large language models are in 1.58 bits. arXiv:2402.17764, 2024.arxiv.org/abs/2402.17764

