betaFeedback

WorksComputer Science

Every Weight Is a Path of Shared Discrete Decisions

Abstract

We introduce TWIG (Tree-structured Weights with Inherited Gates), a representation in which every weight of a neural network is the end of a path of small discrete decisions: a sign, a shift by a power of two, a zero gate, an index into a shared table. Weights that belong together share the upper part of their paths, and each decision is inherited by every weight below it, so it is stored once and applied once. This simple change has three consequences. Any trained network can be written as a TWIG, and when the decisions are powers of two its weight layers become circuits made almost entirely of wires and adders, suited to chips whose weights are fixed at fabrication. Pruning, quantization, low-rank factorization, codebooks and weight sharing become edits of one object, so a single optimizer can choose among all of them for a whole network. And choosing the decisions is the ground-state problem of a higher-order Boltzmann machine whose interactions follow the paths of the tree, the problem class that annealers and quantum optimizers are built to solve. Today these questions are handled apart: each compression method brings its own format and solver, a circuit with fixed weights needs a dedicated constant multiplier for every weight, and discrete solvers reach only narrow subproblems such as rounding. Weight formats have long been moving toward shared decisions, through group scales, shared exponents, microexponents and sparse weights; TWIG takes this trend to its end, and every common format is a shallow TWIG at no extra cost. On five weight matrices of a large language model, a flat tree whose signed power-of-two terms are chosen per weight for circuit cost, with no group scales, needs 9–15% fewer additions than GPTQ at equal layer error at 3- and 4-bit accuracy on typical matrices, and 20–55% fewer on matrices with strong outliers.

Introduction

Modern neural networks are trained in the continuum. Gradient descent needs a smooth landscape to follow, so weights are modelled as real numbers and learning is described as motion through a high-dimensional real space; much of what we understand about optimization and generalization rests on this view. Deployment, however, takes place in a discrete world. On digital hardware, every weight is a finite bit pattern drawn from a fixed format, every product is computed by a circuit of logic gates, and every byte has to be moved through a memory hierarchy. The passage from the continuous model that was learned to the discrete object that is executed is therefore unavoidable, and it has grown into a research field of its own.

That field has grown in pieces. Pruning removes weights, quantization restricts them to finite grids, low-rank factorization replaces matrices by products of thinner ones, codebook methods map blocks of weights to entries of a shared table, and weight sharing reuses parameters across layers. Each family brings its own storage format, its own solver and often its own kernel, and combining them (four bits in one layer, half of the weights pruned in another, a low-rank correction in a third) remains largely a matter of manual design, without a common yardstick.

Two further questions sit almost entirely outside this picture. The first is the cost of computing with the weights rather than storing them: in digital logic a multiplier is considerably larger and more energy-hungry than an adder [30], and in circuits whose weights are fixed at fabrication, such as printed classifiers [57] or chips that hardwire an entire language model [71], every weight calls for a constant multiplier of its own. The second is the reach of discrete optimization: choosing discrete weights is a combinatorial problem, yet annealers, samplers and quantum optimizers, which are built for exactly such problems, have so far been applied only to narrow parts of it, such as the rounding of a single layer [59]. What is missing, we argue, is a representation of weights that is discrete by construction, that makes the structure shared by weights explicit, and that exposes the cost of applying them.

The formats used in practice have been moving toward such a representation for some time (Figure 1). Group quantization lets the weights of a group share one scale [22, 47]; block floating point and the microscaling formats let a block of weights share one exponent [65, 66]; sparse formats let the description of a weight end as soon as it is known to be zero; and codebook methods describe a whole block of weights by one or a few entries of a shared table [16, 77]. Each of these steps records a decision once for many weights instead of once for every weight, and each has paid off in memory, bandwidth and speed. A few formats already stack two or three levels of shared scales, such as shared microexponents [67] and HiFloat4 [50]. Yet each format shares one fixed kind of decision, at levels fixed in advance, in a format of its own.

Comparison of 16-bit float, group scale, shared exponent, and TWIG state tree formats

Figure 1. From formats in use to TWIG. Each column of boxes is the description of one weight, read from top to bottom; a box that spans several weights is a decision they share, stored once. (a) A 16-bit float stores a sign, an exponent and a mantissa for every weight. (b) Group quantization shares one scale among the weights of a group. (c) Block formats share an exponent,and a zero ends a weight’s description. (d) A state tree shares decisions at every level, and each decision is inherited by every weight below it: one scale for all four weights, a halving for the first pair, an “off” switch for the second pair, after which nothing more is stored (dashed). Blue: shared decisions; orange: private decisions; grey: zero.

We take this trend to its natural end. Our proposal can be stated in a single sentence:

Write every weight as the end of a path of small discrete decisions, and let weights that belong together share the upper part of the path.

The result is a tree over the entries of a weight matrix (Figure 1d). Each internal node holds one small decision (a shift by a power of two, a sign, a zero gate, an index into a shared table), which is inherited by every weight below it; each leaf holds the little that remains private to a single weight; and the value of a weight is the product of the decisions along its path. We call this representation TWIG, for Tree-structured Weights with Inherited Gates, and refer to an individual tree as a state tree. A state tree still describes an ordinary real matrix, so the learned model and its deployed form remain directly comparable; what the tree adds is an explicit account of how the matrix is stored, which decisions its entries share, and what it costs to apply.

This single change addresses the three questions above at once, because the same tree can be read in three ways (Table 1). Read as a compressed model, a state tree contains today’s formats as shallow special cases, and pruning, quantization, factorization, codebooks and sharing all become edits of the same object; methods developed separately become comparable and combinable, and a single budgeted optimizer can choose among all of them for a whole network (Section 5). Read as a circuit, a tree whose decisions are powers of two multiplies by shifting, which in fixed hardware is merely a way of routing wires; its weight layers become circuits made almost entirely of wires and adders, and precision and circuit size become a single quantity (Section 6). Read as an optimization problem, choosing the decisions of a tree is the search for the lowest-energy state of a higher-order Boltzmann machine whose couplings are supplied by the data and whose higher-order terms follow the paths of the tree, the problem class that classical samplers, annealers and quantum optimizers are built to solve (Section 7). Finally, because the decisions are explicit, a network could be trained directly in this discrete space, so that the trained object is already the deployed one; we outline this direction in Section 8.

Part of the treeIn compressionIn a circuitIn a Boltzmann machine
Shift stateshared exponent or scale, as in Figure 2a re-routing of wiresone binary unit
Zero state (gate)pruning, from single weights to whole headsa missing wirea unit that switches off its subtree
Leaf alphabetquantization grida sign and a shift at an adder inputa one-hot group of units
Sum of treesresidual correction, extra precisionone more term, one more additionone more term in each weight
Product of treeslow rank, fixed rotationstwo smaller circuits in sequenceunits of two factors coupled together
Shared subtreecodebook, dictionary, cross-layer sharingstored once; computed once when its input is sharedunits shared by many weights
Choosing the statesthe compression methodthe circuit designfinding the ground state

Table 1. One tree, three readings. Each part of a state tree has a meaning in compression (§ 5), in circuits (§ 6) and in discrete optimization (§ 7); this is what lets one representation serve all three.

Contributions.

  • We introduce TWIG, a representation of neural network weights as trees of shared discrete decisions, together with its two costs: storage bits and circuit additions (Section 2).

  • We establish its basic properties: it contains the number formats in use today at no extra cost, it loses nothing in the worst case and uses fewer bits where weights share structure, and any matrix can be approximated, to any precision, by a sum of power-of-two trees that is applied with shifts and additions alone (Section 3).

  • We show that the main families of compression methods are edits of one object, chosen by a single budgeted optimizer that is exact under additive costs (Section 5).

  • We show how a state tree maps onto a circuit of wires and adders, and report a first measurement on five weight matrices of a large language model: a flat tree whose signed power-of-two terms are chosen per weight saves 9–15% of the additions of GPTQ at equal layer error at 3- and 4-bit accuracy on typical matrices, and 20–55% on matrices with strong outliers (Section 6).

  • We show that choosing the states of a tree is the ground-state problem of a higher-order Boltzmann machine whose higher-order terms follow the paths of the tree, which connects weight selection to classical and quantum discrete optimizers (Section 7).

Several of the properties restate classical results in the language of trees, as marked in Section A; the results specific to state trees are the reach of shared shifts, the equivalence of two encodings, the exact optimizer with shared subtrees and the higher-order Boltzmann machine. Section 9 collects first evidence on real models and beyond them, and Section 10 relates TWIG to number formats, decision diagrams and multiplier-free networks. Precise definitions, statements and proofs are collected in Section A.

From numbers to state trees

A number is a path of decisions

Consider a weight stored in 16-bit floating point, w1=0.15625w_1 = 0.15625 (Figure 2a). Its sixteen bits are not read as one number but as three decisions: a sign bit ss, a five-bit exponent ee and a ten-bit mantissa mm. On the normal range the value they encode is a product of three factors, one per decision,

Two floating-point weights represented as a shared decision tree

Figure 2. A first example. (a) Two neighbouring weights stored in 16-bit floating point; their exponents are identical, yet the format stores them twice. (b) Because a weight is the product of its decisions, the shared exponent can be stored once in a node above both weights; each weight is recovered exactly as the product along its path. (c) The same tree computes w1x1+w2x2w_1x_1 + w_2x_2 without forming either weight: each leaf becomes shifted copies of its own input (≫k\gg k shifts by kk binary positions, i.e. multiplies by 2−k2^{-k}), and the shared exponent is applied once, to the sum, as a shift by three positions. Three additions replace two multiplications and one addition.

w=(−1)s⋅2e−15⋅(1+m1024),w = (-1)^s \cdot2^{e-15} \cdot\left(1 + \frac{m}{1024}\right),

so that w1=(+1)⋅2−3⋅1.25w_1 = (+1) \cdot2^{-3} \cdot1.25. Read from left to right, the decisions form a path: the sign selects a half-line, the exponent an octave within it, and the mantissa a point within the octave. Now consider a second weight from the same matrix, w2=−0.1875=(−1)⋅2−3⋅1.5w_2 = -0.1875 = (-1) \cdot2^{-3} \cdot1.5. Its sign and mantissa differ from those of w1w_1, but its exponent is the same: both weights lie in the same octave of magnitudes. In a standard format each weight owns its entire path, so this common exponent is stored twice.

Sharing a decision at the same precision

Because the value of a weight is a product of its decisions, a factor that two weights have in common can be taken out of both and stored once, in a node placed above them (Figure 2b). The node holds the exponent, 2−32^{-3}; the two leaves below it hold what remains private to each weight, a sign and a mantissa. Each weight is recovered as the product of the decisions along its path from the node to its leaf, so both values are reproduced exactly, at the same precision as before, with 5+2×11=275 + 2 \times11 = 27 bits instead of 32. The saving grows with the size of the group: gg weights that share an exponent need 5+11g5 + 11g bits instead of 16g16g, a reduction that approaches 31% for large groups without changing a single value. The weights of a trained layer rarely share an exponent exactly, but neighbouring weights tend to lie within a few octaves of one another. A second kind of shared decision covers this case: a node that holds a single bit and either leaves everything below it unchanged or halves it. Placed at several levels, such bits let weights of different but nearby magnitudes share most of their path, and the private part left at each leaf can then be shortened where accuracy allows. This is the general state tree of § 2.4.

Multiplying without rebuilding the weight

The same structure changes how the weights are used. A layer never needs the weights themselves, only their products with its inputs, here y=w1x1+w2x2y = w_1x_1 + w_2x_2. Written along the tree,

y=2−3[(1+2−2)x1−(1+2−1)x2].y = 2^{-3}\left[(1 + 2^{-2})x_1 - (1 + 2^{-1})x_2\right].

Each leaf acts on its own input, and the shared node acts once, on the sum of its subtree (Figure 2c). Every factor is a power of two, so every multiplication is a shift: x1+(x1≫2)x_1 + (x_1 \gg2) and x2+(x2≫1)x_2 + (x_2 \gg1) take one addition each, a subtraction combines them, and the shared exponent becomes a shift of the result by three positions, which in a circuit with fixed weights is only a way of routing wires. Three additions replace two multiplications and one addition, and neither weight is ever formed as a number. In general a mantissa has more nonzero digits than in this example, and each costs one addition; § 3 shows that a few signed power-of-two terms per weight suffice for any desired precision, and § 6 measures how many are needed on real weights.

State trees in general

The example has a single shared node. A state tree applies the same idea at every level of a hierarchy over the entries of a matrix. Figure 3 shows the tree we use as a running example. It describes one column of a weight matrix with eight rows, arranged as the leaves of a balanced binary tree. Every internal node holds one bit, which either leaves everything below it unchanged or halves it, and every leaf holds one of five states, {0,±1,±12}\{0,\pm1,\pm\frac{1}{2}\}: a sign and a small magnitude, possibly zero. The value of an entry is the product of the states on its path from the root, multiplied by a scale for its row and a base value for its column. For row 6, the path drawn in red gives 14ρ6βj\frac{1}{4}\rho_6\beta_j.

A deeper state tree for one column of a matrix with eight rows

Figure 3. The running example: a deeper state tree for one column jj of a matrix with eight rows. Each internal node holds one bit that halves everything below it or leaves it unchanged; each leaf holds a sign and a magnitude, possibly zero. The value of an entry is the product of the states on its path (red), times a row scale and a column base, Equation (1). Apart from ρiβj\rho_i\beta_j, every factor is a power of two or zero. The column stores 7 node bits (6 if the root bit is folded into βj\beta_j) and 8 five-state leaves, about 3.2 bits per weight.

In general, a state tree is a tree whose leaves are the entries of a matrix and whose nodes hold states, each drawn from a small alphabet and each standing for a value; choosing the state of a node is one decision, and it is inherited by every entry below the node. The entry in row ii and column jj is

W^ij=ρiβj∏nodes v on the path to (i,j)(value of the state at v),(1)\widehat{W}_{ij} = \rho_i \beta_j \prod_{\text{nodes }v\text{ on the path to }(i,j)} \left(\text{value of the state at }v\right), \tag*{(1)}

where the row scales ρi\rho_i and column bases βj\beta_j carry the overall scale of the matrix and may be stored in any format, for example FP16. Internal nodes stand for groups of entries (a block of a row, a pair of neighbouring rows, a channel, an attention head, the whole matrix), and a decision at a node is shared by its whole group. A tree can be as shallow as the single shared exponent of Figure 2 or as deep as the running example. Because neighbours share decisions, the order of the rows matters: in the running example, rows with similar magnitudes are placed next to each other. A tree may group the entries of a row or of a column. The tree of Figure 2 groups two entries of one row, so its shared shift acts once on a sum of inputs; the running example groups the entries of one column, so a shared shift acts once on an input before it fans out to several outputs. The two orientations cost the same bits, but they give different circuits, and, as § 7 will show, they couple different leaves when the states are optimized. A handful of kinds of states do most of the work:

  • a shift has a power of two as its value and rescales everything below it, like the shared exponent of Figure 2;

  • a gate has the value zero and deletes everything below it, so nothing below a closed gate needs to be stored;

  • a transparent state has the value one, so a node can always be present without changing anything;

  • signs and small magnitudes complete the description at the leaves;

  • a lookup is a state whose value depends on the states above it; for example, the entries below an index into a shared table read their values from the table.

Combining trees

A single tree describes every weight by one path. Three operations combine trees into richer descriptions, and each of them has a familiar meaning. The first is the sum. Look again at the leaf of w1w_1 in Figure 2: its mantissa, 1.25=1+2−21.25 = 1 + 2^{-2}, is already a sum of two powers of two, and each of the two terms became one wire into the adder. In general, a sum adds two trees entry by entry and expresses “a coarse description plus a correction”: a first tree gives every weight its leading power of two, a second tree adds the next one where it is needed, and each additional term costs one addition. Sums are how a state tree buys precision. The second is the product, which multiplies two trees as matrices. It expresses “a product of two thin matrices”, as in low-rank factorization, or “a matrix placed between two fixed transforms”, as in methods that rotate weights before quantizing them. The third is the reference, which points to a tree defined elsewhere. It expresses “look it up in a shared table”: the referenced tree is stored once and may be read by many entries, many matrices or many layers, as a codebook or a shared dictionary is. With references, the tree becomes a directed acyclic graph, which we call a state-tree graph; we keep the shorter name when the distinction does not matter. Sums, products and references reappear in § 3 as the dials that make the representation universal, and in § 5 as the edits behind familiar compression methods.

Two prices: bits and additions

The example of Figure 2 already showed that a state tree has two costs, and both can be read from the tree itself. The storage cost is the number of bits needed to write down the states: the logarithm of the alphabet size for every stored state, with shared parts counted once and nothing counted below a closed gate. In Figure 2 it is 27 bits for two weights, against 32 in FP16. The column of Figure 3 stores seven node bits and eight five-state leaves, 7+8log⁡25≈25.67 + 8\log_2 5 \approx25.6 bits or about 3.2 bits per weight; for long columns the cost approaches 1+log⁡25≈3.31 + \log_2 5 \approx3.3 bits per weight, plus the row scales and column bases. Folding the root bit into the column base saves one more bit per column (Theorem A.10), and a fractional cost such as log⁡25\log_2 5 is reached by coding leaves jointly, for example three five-state leaves in 7 bits, since 53<275^3 < 2^7. The circuit cost is the number of additions needed to apply the matrix to an input when every state is a power of two, a short sum of powers of two, or zero. A power of two only shifts an input, a sign only negates it, and a zero removes it, so all that remains is adding up the shifted inputs: one addition for every term beyond the first in each output. In Figure 2 this gives three additions. In the running example, every nonzero entry contributes a single shifted copy of its input to its output, and the two zero entries contribute nothing. § 6 develops this view for whole networks. The two prices need not agree, and the example shows why. Sharing the exponent of w1w_1 and w2w_2 saved five bits but not a single addition: a shift by three positions costs nothing in a circuit with fixed weights, whether it is applied once to the sum or separately to each term. The three additions came entirely from the nonzero digits at the leaves. In general, shared decisions save bits, while additions are saved only by having fewer nonzero terms, so the best tree for storage and the best tree for circuits can differ (§ 6). Because the representation makes both prices explicit, an optimizer can trade one against the other.

One tree, three readings

The vocabulary is now complete, and it can be read in three ways (Table 1). In compression, the states are what is stored, and choosing them is the compression method. In a circuit, the states become wires and adders, and choosing them is the circuit design. In discrete optimization, the states are binary units, and choosing them is the search for the configuration of lowest energy. The rest of the paper follows these three readings in turn, after first establishing, in § 3, what state trees can and cannot express.

What state trees can express

The example of Figure 2 raises four natural questions. Does writing weights as state trees lose anything that today’s formats offer? Can every matrix be described in this way, and at what price in bits? Can multiplications always be avoided without giving up precision? And what does it cost to share a decision? This section answers them in turn. We state each answer informally, as a property; the precise statements and their short proofs are collected in Section A. The properties refer to two variants of the model. In the core model, the value of every state is fixed in advance. The general model also admits lookups, whose values depend on the states above them, as a mantissa depends on whether its exponent is subnormal. With lookups, any code that is decoded from the root down is a state tree, so Property 1 is a statement about costs rather

FormatShared decisions (nodes)Private decisions (leaves)
FP32, FP16, BF16, FP8†—sign, exponent, mantissa (a chain of three)
Integers with group scalescale per groupbb-bit code
with zero point†scale and zero point per groupbb-bit code, read relative to the zero point
Block FP, microscaling (MX)exponent per blocksmall float or integer
Shared microexponents (MX6, MX9), HiFloat4scale per block, then one or two levels of 1-bit shifts per sub-blocksmall float or integer
Ternary (BitNet b1.58)one scale{−1,0,+1}\{-1, 0, +1\}
Vector codebooks (e.g. QuIP#)†index per block into a shared table— (entries read from the table)
N:MN:M sparsity†which NN of MM entries are nonzerovalues of the NN kept entries

caption: Formats in use are shallow state trees, at no more than their original cost (Property 1). †Uses lookups: subnormal mantissas, codes read relative to a zero point, entries read from a codebook, and entries kept by an N:MN:M mask; the other rows are core trees. Additive codebooks and rotations are built from these pieces with sums and products; trellis codes, whose overlapping windows share bits without nesting, fit only as a codebook over a whole block, with a table that is generated rather than stored. Deeper trees add levels of shared decisions between the two columns.

:::

than about expressiveness. It is the only property that needs lookups (marked in Table 2); all others hold in the core model.

Nothing is lost: today’s formats are shallow state trees

The shared exponent of Figure 2 is not an exotic construction: it is what block floating point and the microscaling formats already do for blocks of weights, and a group scale in integer quantization plays the same role. Every format in common use turns out to be a state tree with only a few levels.

Property 1 (Existing formats). Floating-point formats, integers with group scales and zero points, block floating point and microscaling formats (including shared microexponents), ternary weights, vector codebooks and N:MN:M sparsity are all shallow state trees, with at most five levels of decisions on any path. Each costs at most as many bits as the original format, and exactly as many for the dense formats (Table 2; Theorem A.4).

Adopting state trees is therefore a conservative step: whatever a format in use today can store, a state tree stores at no extra cost. Refining a tree never removes options either. A new node can always be given the transparent state, and an alphabet can always be enlarged, so a deeper tree contains every shallower one with the same leaves (Theorem A.5). Most formats of Table 2 occupy only the top and bottom of the tree; shared microexponents and HiFloat4 already use one or two levels in between, and these levels are where new structure can go.

Nothing is lost in the worst case

In Figure 2, sharing the exponent did not change which values the two weights could take; it only stopped the format from paying twice for the same decision. This is the general picture. What a tree can express is governed by the number of states it stores, and where those states sit decides how much the description costs.

Property 2 (Completeness). A tree with KK possible values at each leaf represents every matrix whose entries come from a set of KK values, using log⁡2K\log_2 K bits per entry, and no encoding that can represent all such matrices uses fewer bits on every one of them. With finely spaced leaf values, state trees approximate every matrix to any accuracy, within a vanishing margin of the number of bits that any encoding needs in the worst case (Theorems A.6 and A.7).

A tree can always spend its states at the leaves and behave as an ordinary quantizer, so it never does worse than a flat format. Spending states higher up, where one state serves many weights, pays off when the weights have the corresponding structure: similar magnitudes within a group, as in Figure 2, runs of zeros, or repeated patterns. For matrices without any such structure, no representation can do better on all of them at once, and a state tree costs the same as a flat format. State trees do not create structure; they give it a place to go.

No multiplications: shifts and additions suffice

In Figure 2, every factor was a power of two, so every multiplication became a shift. The two mantissas helped: 1.25 and 1.5 each need only two power-of-two terms. A single tree whose states are powers of two can only produce values of the form ±2k\pm2^k (Figure 4a, middle). This is a logarithmic grid, and its worst-case relative error, one third, does not shrink as the tree grows. The remedy is the sum of § 2: add a second tree for the next term, and a third if needed.

Three dials along which state trees grow: states, rank, and sharing

Figure 4. Three dials along which state trees grow. (a) Adding states: a flat grid; a shift tree, whose values form a logarithmic grid; and a sum of two shift trees, which reaches the uniform 17-level grid of all multiples of 18\frac{1}{8} in [−1,1][-1,1], since each of them is a sum of at most two signed powers of two with exponents down to −3-3 (Property 3). (b) Adding rank. (c) Sharing a subtree among several matrices, possibly in different layers. With real-valued factors, rank or sharing alone reaches every matrix.

Property 3 (Shifts and additions suffice). A sum of tt trees whose states are powers of two approximates every matrix to a relative error of 3−t3^{-t} in every entry, within the range of exponents its states allow. It represents every matrix of integers of magnitude below 2b2^b exactly with ⌈b+12⌉\lceil\frac{b+1}{2}\rceil terms per entry, and with about b/3b/3 nonzero terms on average. Applying such a sum to an input needs shifts, additions, and only m+nm+n genuine multiplications, by the row scales and the column bases that the tt trees share (Theorem A.8).

Each additional power-of-two term in a weight costs one addition and divides the worst-case error by three (Figure 4a, bottom). Precision and circuit size thus become one and the same quantity, the number of terms, which § 6 turns into circuits. The remaining m+nm+n multiplications can themselves be expanded into shifts and additions, or folded into neighbouring layers.

The price of sharing

Sharing a decision saves bits, but it constrains the weights that share it. In Figure 2 the shared exponent required both weights to lie in the same octave. The halving bits of the running example relax this requirement in a precise way.

Property 4 (What shared shifts allow). In a binary tree of shift bits, two nonzero entries whose closest common node lies hh levels above them can differ in magnitude by at most a factor of 2h2^h. Every pattern of magnitudes that obeys this rule at every node, within the range that the depth of the tree allows, can be reached (Theorem A.9).

Neighbours in the tree must therefore have similar magnitudes, which is why the order of the rows matters, and why a richer leaf alphabet or a second tree is used where neighbours differ a lot. The order matters for bits only; additions do not depend on it, since shifts are free in a fixed circuit. Theorem A.9 also states what a good order must achieve: within every node, the exponents of the nonzero entries may spread by no more than the height of the node. Splitting the rows recursively into balanced halves of similar magnitude is a natural way to approach it. The rule is the same whether the shift bits sit on the edges of the tree, with leaves {0,±1}\{0,\pm1\}, or on its nodes, with leaves {0,±1,±12}\{0,\pm1,\pm\frac{1}{2}\} as in the running example: the two encodings describe exactly the same columns, up to one factor per column (Theorem A.10). Yet the second costs about 3.3 instead of 3.6 bits per weight, with leaves coded jointly in both. The saving comes from merging the shift on the edge into each leaf with the leaf’s own alphabet: a zero needs no shift, so the six combinations of a shift bit and a three-state leaf collapse into five values. The same matrices can thus be described at different prices, and finding the cheaper description is part of choosing a tree. As a small proof of concept, we used the tree of the running example as a post-training quantizer for the MLP layers of LLaMA-3-8B, with one balanced tree per column over rows ordered by recursive bisection of their magnitude profiles, and states chosen by an exact dynamic program per column with GPTQ-style error feedback: at 3.33 bits per weight it reached a WikiText-2 perplexity of 7.78, against 8.03 for GPTQ at 3.25 bits,2 and the edge-bit encoding produced identical weights at 3.60 bits, as the equivalence of the two encodings predicts.

Beyond states: rank and sharing

The number of states is one dial along which a state tree grows. The other two operations of Section 2 provide two more (Figure 4b,Figure 4c). Rank. A sum of rr products of a column and a row describes exactly the matrices of rank at most rr, so full rank describes every matrix. When the error is measured on the outputs of the layer, the best low-rank tree has a closed form, a singular value decomposition in a reweighted space, a classical result of reduced-rank regression [32] that SVD-LLM [84] recovers (Theorem A.11). Sharing. Several matrices with the same input size, in one layer or in different layers, can refer to one shared subtree that is stored once (Figure 4c). The more the shared part contains, the more the matrices have in common, and a large enough shared part describes them exactly (Theorem A.12). With real-valued factors, each of these two dials on its own reaches every matrix. When the factors are themselves written as state trees, the three dials combine, and a single description can trade states, rank and sharing against one another.

ReadingSetting and metricBaselineState tree
Storage and servingBF16 weights stored exactly; bits per weightBF16: 16 bits12.13 bits (−24%), bit-exact
LLaMA-3-8B, layer 15; matrix–vector speed-up, batch 1–8cuBLAS (A100); PyTorch (CPU)1.05–1.51×; 1.24–1.27×
same matrices and batches, format alone (bound 1.32×)our kernel on BF16 (A100)1.03–1.27×
vLLM end-to-end serving, Llama-3.2-1B and Qwen3.5-9B; speed-up at batch 1 / 8 / 32vLLM, BF161.23× / 1.17–1.21× / ≈1.0×
CompressionLLaMA-3-8B at 3.25 bits per weight, no training; perplexity on WikiText-2 / C4 / FineWebstrongest GPTQ: 8.09 / 12.72 / 11.816.95 / 10.93 / 9.76
Discrete optimizationQwen2.5-1.5B-Instruct at 2.44 bits per weight, only states change; validation KL, GSM8K, MMLUbefore tuning: 0.491, 13.95, 48.30.371, 21.83, 49.6
LLaMA-3-8B, layer 1 down projection, 3.3-bit tree; relative output errorbefore sampling: 0.02670.0153
CircuitsLLaMA-3-8B, adders per weight at equal layer error (Table 5)GPTQ at 4 / 3 / 2 bits9–32% / 14–55% / 30–63% fewer

Table 6. One result for each reading of the tree. The strongest GPTQ uses act-order and an MSE-optimized grid in the same pipeline. Perplexity at context 2048 (FP16: 6.14 / 9.44 / 7.85); bits per weight cover all linear layers of the transformer blocks, scales included.

Summary. State trees lose nothing that today’s formats offer, they lose nothing in the worst case, they reach any precision with shifts and additions, and they make the price of sharing explicit. What they offer in return is a single object on which the many methods of model compression can be expressed and compared, which is the subject of section 5.

Building a tree, step by step

The previous sections described state trees in general. In this section, we illustrate how to build one in full, on a small matrix, so that every decision can be followed. The tree we build is the one behind our lossless format (§ 9): it stores BF16 weights exactly, in fewer bits, and a GPU decodes it directly into the registers of its tensor cores. Every choice below is made with that decoder in mind.

Step 1: every weight is a path. Figure 5a shows a 4×44 \times4 matrix in BF16. As in § 2, each weight is read as three decisions: a sign ss, an 8-bit exponent field ee and a 7-bit mantissa mm, with w=(−1)s⋅2e−127⋅(1+m/128)w = (-1)^s \cdot2^{e-127} \cdot(1 + m/128). The shading shows the octave 2e−1272^{e-127} of every weight. Within a row the weights lie within a few octaves of one another, as trained weights usually do, but their exponents rarely coincide, so the single shared exponent of Figure 2 cannot be used as it stands.

Building the tree of the lossless format

Figure 5. Building the tree of our lossless format. (a) Weights of a trained layer lie within a few octaves of one another, but rarely share an exponent exactly. (b) Each group keeps its largest exponent once; every weight keeps only its distance DD below it, and its sign and mantissa. (c) The resulting tree has a fixed shape: one node per group, one state and one leaf per weight. Blue: shared decisions; orange: private decisions. The example uses groups of 4 weights; the format uses groups of 64.

Step 2: choose the groups. The tree groups the four weights of every row in their natural order; in the format a group holds 64 consecutive weights of a row. Groups run along the input dimension for two reasons. Their weights are multiplied by consecutive inputs and summed into the same output, so in a circuit the shared factor of a group could be applied once to its partial sum, as in Figure 2c. And they lie next to one another in memory, in the order in which a tensor core reads them. Because the order is the natural one, no permutation has to be stored or applied.

Step 3: lift the shared decision. Every group receives a node that holds its largest exponent field EE, stored once in 8 bits. Below it, every weight keeps only its distance to that exponent, the state D=E−eD = E - e, which stands for a shift by 2−D2^{-D} and takes 4 bits, and a leaf that holds its sign and mantissa in 8 bits (Figure 5b). Along every path the product is unchanged,

w=2E−127⋅2−D⋅(−1)s(1+m128),w = 2^{E-127} \cdot2^{-D} \cdot(-1)^s \left(1 + \frac{m}{128}\right),

so the tree reproduces every weight exactly. In row 1, EE encodes 2−52^{-5} and the four states are 0, 1, 0 and 2; the red path in Figure 5c decodes w14w_{14}. Unlike the shared exponent of § 2, this node does not require the exponents of a group to be equal: the states absorb their differences, which is the second kind of shared decision anticipated there.

Step 4: set aside the rare outliers. A 4-bit state distinguishes 16 values. The states 0 to 14 are distances, so the weights of a group may spread over 15 octaves. A weight that lies further below the largest of its group, an exact zero for instance, takes the state 15 as an escape: its leaf is left empty, and its 16 bits are kept exactly in a short side list. No weight of the example needs an escape; in the models we tested, about one weight in ten thousand does (Section A.4).

Step 5: count the bits. A group stores 8+4×(4+8)=568 + 4 \times(4 + 8) = 56 bits for its four weights, against 64 in BF16. As with the shared exponent of § 2, the saving grows with the group: with 64 weights a group needs 8/64+12=12.1258/64 + 12 = 12.125 bits per weight, and with the escapes, whole models take 12.13 bits per weight, 24% less than BF16, with every weight bit-exact.

Step 6: decode without pointers. Figure 6 shows how the first group is stored. Every field has a fixed width at a fixed offset: the shared exponent in the first byte, the four states in the next two and the four leaves in the last four. A thread that needs weight jj of a group computes the addresses of DjD_j and LjL_j from jj alone; it never reads a pointer and never branches, except at the rare escape. Rebuilding the BF16 pattern takes a subtraction and two copies: the exponent field is E−DjE-D_j, and the sign and mantissa come from the leaf. The result is written directly into the registers from which the tensor cores read, so the weights never travel through memory in BF16. This is what lets the kernel of § 9 run at the speed of memory.

The stored record of group $g_1$ and the decoding of $w_{14}$

Figure 6. The stored record of group g1g_1 and the decoding of w14w_{14}. Every field has a fixed width at a fixed offset, so the address of any weight’s state and leaf follows from its index alone. Decoding subtracts the state from the shared exponent and copies the sign and mantissa from the leaf. In the format, a block of 16 rows and 64 columns, the shape the kernel feeds to the tensor cores, is one record of 16×97=1,55216 \times97 = 1{,}552 bytes.

Why a tree, and not something smaller. The tree we have built is not the shortest possible description of the matrix. Groups whose subtrees coincide could be stored once, turning the tree into a graph; prefixes shared by different groups could be merged, as in a trie; weights could be grouped by magnitude rather than by position; and the states could be entropy-coded, since small distances are far more frequent than large ones. Each of these would lower the bits further, but each needs pointers, indices or codes of variable length that a decoder must follow before it can locate a weight, and that breaks the fixed addressing that lets a tensor core read its weights at full speed. We therefore keep the fixed-shape tree and leave these richer representations to future work. We do not claim that this tree, or trees in general, are the optimal representation of a weight matrix. We claim that the tree improves on the representations in use in several respects at once: it stores exactly the same values in fewer bits, it decodes at the speed of memory, and it makes explicit the structure that the following sections edit, wire and optimize.

From exact to compressed. The same tree also shows what compression does. Keeping only the leading three bits of every mantissa shrinks the leaf alphabet from 256 to 16 values and the leaf from 8 to 4 bits. The tree keeps its shape, but now describes an approximation of the matrix rather than the matrix itself. Every compression method can be read as an edit of this kind, which is where the next section begins.

Compression is editing one tree

Model compression has grown into several families (pruning, quantization, low-rank factorization, codebooks and weight sharing), each with its own format, its own solver and often its own kernel. Combining them is hard precisely because their formats differ. In a state tree they become something simpler: different ways of editing one object.

Every method is an edit

The two weights of Figure 2 already show most of the edits. Replacing the leaf of w2w_2 by the state 0 prunes w2w_2; a zero state at the shared node removes both weights at once, which is structured pruning in miniature. Shortening the mantissas is quantization: 1.25 and 1.5 use only two of their ten mantissa bits, so for these two weights a two-bit alphabet loses nothing. The shared exponent itself is an inserted node, the same edit that produces group scales and block formats. Writing 1.25 as 1+2−21 + 2^{-2} splits a leaf into a sum, which is how residual corrections and additive codebooks work. The remaining edits act on whole matrices: factoring a tree into a product gives low rank and rotations, a reference to a shared part gives codebooks and weight sharing across layers, and a selector that chooses among several subtrees gives mixed precision and the choice of a method for each matrix. Table 3 lists these seven edits, and Figure 7 draws the most common ones. Common compression methods, including all those cited in the table, are combinations of them, together with a rule for choosing the new states.

EditWhat changes in the treeFamiliar name
Zero a statea leaf or node state takes the value 0unstructured, N:MN:M and structured pruning [43, 29, 23, 70, 54, 95]
Shrink an alphabetfewer states at the leaves or nodesquantization [22, 47, 37], ternarization [51]
Insert a shared nodea new group with a scale, shift or signgroup scales, shared exponents [66]
Split into a sumW→W1+W2W \to W_1 + W_2low rank plus residual, additive codebooks [16]
Factor into a productW→UVW \to UV or W→R1W′R2W \to R_1 W' R_2low rank [84, 74, 91, 93], rotations [77], butterfly [13]
Reference a shared parta subtree is stored once and used many timescodebooks [79, 77, 76], sparse dictionaries [92], cross-layer sharing [41, 83, 96, 94]
Choose among subtreesa selector state picks one encodingmixed precision, method selection

Table 3. Seven edits of a state-tree graph. Common compression methods, including those cited here, are combinations of these edits, together with a rule for choosing the new states.

Compression methods as edits of a state-tree graph

Figure 7. Compression methods as edits of a state-tree graph. Grey: zero states; green: sum (++) and product (×\times) nodes; purple: references to shared subtrees.

Methods differ only in how they choose states

Seen this way, methods within one family share a representation and differ only in how they choose the states. Magnitude pruning, Wanda [70], SparseGPT [23] and ALPS [54] all produce zero states at the leaves; they differ in their criterion and their solver. Round-to-nearest, GPTQ [22] and AWQ [47] all choose leaf states under group-scale nodes; again, only the rule for choosing differs. Two consequences follow. Methods of the same family can be compared on equal terms, since they produce the same kind of object. And methods from different families can be combined without inventing a new format: a quantized low-rank factor, or a pruned tree that reads from a shared codebook, is simply a deeper tree.

Pricing an edit

To choose among edits, each one needs a price in accuracy. Because every edit changes the same kind of object, a single error measure can price all of them. The standard choice measures the error on the outputs of the layer: with calibration inputs x1,…,xN∈Rnx_1,\ldots,x_N \in\mathbb{R}^n, taken as column vectors, their second moment H=1N∑νxνxνTH = \frac{1}{N}\sum_{\nu} x_\nu x_\nu^{\mathsf{T}} and the error E=W−W^E = W - \widehat{W},

fH(W^)=tr⁡(EHET)=1N∑ν=1N∥Exν∥2.(2)f_H(\widehat{W}) = \operatorname{tr}(E H E^{\mathsf{T}}) = \frac{1}{N}\sum_{\nu=1}^{N}\lVert E x_\nu\rVert^2. \tag*{(2)}

Correlated inputs make the errors in different columns interact, which is what solvers such as GPTQ exploit. The outputs of a layer do not matter equally to the loss either: the second moment GG of the loss gradients at the outputs records which output directions matter, and it adds an interaction between rows in the Kronecker-factored form tr⁡(GEHET)\operatorname{tr}(G E H E^{\mathsf{T}}) [53, 78]. When such proxies are not accurate enough, the price of an edit can be measured directly, by running the network with the edit applied.

One choice per matrix, one budget for the network

With every method expressed as an edit and every edit priced, compressing a network becomes a single problem. Each matrix receives a menu of edits, covering all methods and all settings, each with a size and an accuracy cost, and the task is to choose one edit per matrix so that the total size fits a budget (Figure 8).

The menu of one matrix and nested candidate groups for shared subtrees

Figure 8. Left: the menu of one matrix in the (size, accuracy cost) plane; only its Pareto set enters the optimizer (Property 5). Right: nested candidate groups for shared subtrees; every group offers either its children’s combined menus or one subtree shared by all of its matrices, and keeping Pareto sets at every node keeps the search exact. Points are illustrative.

Property 5 (One optimizer). If the accuracy costs of different matrices add up, the best choice is found by dynamic programming over the Pareto sets of the menus, exactly up to the resolution of the size grid, and it is never worse than applying any single method, or any uniform setting, that fits the same budget. When the candidate groups for shared subtrees are nested or disjoint, a recursion over the groups keeps the search exact (Theorems A.13 and A.14).

Restricted to one family, this is the per-layer allocation that SPDY solves by dynamic programming [21] and HAWQ-V3 by integer programming [87]; what the tree adds is that one menu can hold edits of every family. The guarantee holds with respect to the cost model. In practice, the costs of edits in different matrices are not exactly additive, and aggressive edits interact. A simple procedure keeps the exact search honest: build and measure the chosen edits together, update their costs, and solve again until the choice stops changing; Section A.4 describes the version used in our experiments.

Finally, the budget need not be counted in bytes. Additions, latency or energy can take its place without changing the algorithm, which turns the optimizer into a compiler for a given hardware target. For state trees the most natural of these budgets is the number of additions, and it leads to the second reading of the tree: as a circuit.

From trees to circuits

Figure 2c computed two weighted inputs with three additions and no multiplication. This section scales that picture up: first to a layer, then to a whole network, and finally to a first measurement on real weights. The motivation is simple. In digital logic a multiplier takes considerably more area and energy than an adder of the same width [30], and a state tree whose states are powers of two needs no multiplier for its weights at all.

A layer becomes wires and adders

Suppose every state of a tree is a power of two, a short sum of powers of two, or zero. Then (1) turns the product y=W^xy = \widehat{W}x into

yi=ρi∑j=1n∑τ=1tij±((βjxj)≫kijτ),(3)y_i = \rho_i \sum_{j=1}^{n} \sum_{\tau=1}^{t_{ij}} \pm\left((\beta_j x_j) \gg k_{ij\tau}\right), \tag*{(3)}

where tijt_{ij} is the number of power-of-two terms in entry (i,j)(i,j) and, as in Figure 2, ≫k\gg k shifts a number by kk binary positions, that is, multiplies it by 2−k2^{-k} (a negative kk shifts to the left). In a circuit whose weights are fixed, Equation (3) is a network of wires and adders (Figure 9). A shift is a re-labelling of wires and a sign is an inverted adder input, so both are free; a zero state is simply a missing wire; and every term beyond the first in an output costs one adder. The only genuine multiplications left are the nn by the column bases and the mm by the row scales of an m×nm \times n matrix. They can be folded into neighbouring layers where no residual addition or nonlinearity intervenes, and otherwise remain; § 6.5 charges them in full.

Circuit diagram showing inputs $x_1$, $x_2$, and $x_3$ entering nodes $\beta_1$, $\beta_2$, and $\beta_3$, with shifted wires feeding adders and outputs $\rho_1$ and $\rho_2$; $\widehat{W}=\operatorname{diag}(\rho)\begin{pmatrix}2^{-1}&-1&0\\0&2^{-2}&2^{-1}+2^{-3}\end{pmatrix}\operatorname{diag}(\beta)$; solid: one power-of-two term per entry; dashed: second term of entry $(2,3)$; $\widehat{W}_{13}=0$: no wire; adders: one per arrow beyond the first into each sum; multipliers: only $\beta_j$, $\rho_i$.

Figure 9. A layer as a circuit. When the states are powers of two, multiplications by weights become shifts and signs, which are wiring; zeros are missing wires; and each additional power-of-two term costs one adder. The only multiplications left are by the column bases and the row scales.

Where the circuits pay off

The gain is largest where weights are fixed at fabrication: printed and bespoke classifiers [57], and chips that hardwire an entire language model into silicon [71]. There, a weight with few nonzero digits is literally a few wires, and the tree states which ones. It is worth being precise about the source of this gain. A general multiplier is itself a shift-and-add circuit: Booth recoding writes one operand in signed digits and adds shifted copies of the other. A state tree makes the same structure explicit and tailors it to the actual weights: in a circuit with fixed weights, zero digits disappear entirely, and the tree can choose weights with few nonzero digits wherever accuracy allows. The same structure serves other targets as well. In programmable hardware, stored states select shifts and signs through small multiplexers, which take area of their own, so the saving over a general multiplier is smaller there, although a shift stored at a node is selected once for its whole group rather than for every weight, so deeper trees also save multiplexers; in software, lookup-table kernels [61, 85] replace multiplications by table reads. Throughout, we assume fixed-point activations. With floating-point activations, adders must first align exponents, which remains cheap when the activations share an exponent per block, as in the microscaling formats.

ComponentAs a state treeIn a circuit
Fully connectedWx+bWx+b a tree (or graph) for WWshifts and adders; the bias is a constant input
Convolutionone shared subtree, referenced per positionreplicated per position, or reused over time
Winograd / fast convolutionproducts with fixed shift-tree transformsshifts and adders only
Attention projectionsfour trees; Q,K,VQ,K,V share their inputshared partial sums across WQ,WK,WVW_Q,W_K,W_V
Attention scores, contextproducts of two activationsmultipliers, or a separate treatment
Gated MLPtwo trees that share their inputshared partial sums; a multiplier for the gate
Softmax, GELU, SiLU—small tables or piecewise-linear units
Embeddingrows of a tree, decoded on lookupmemory only
Output heada tree, possibly tied to the embeddingshifts and adders
Batch normalizationfolded into ρ\rho, β\beta and the biasnothing left
Layer and RMS normalizationgain folded into the next β\betasquares and a reciprocal square root per token

Table 4. How the components of common networks map onto state trees and circuits. Every product of a weight and an activation becomes shifts and additions; what remains are products of two activations and a few nonlinear functions.

A whole network

Table 4 goes through the components of common networks. Fully connected layers are exactly Equation (3), with biases as constant adder inputs. A convolution applies one kernel matrix at every position [8], so it is one shared subtree referenced at every position; its circuit is either replicated per position or built once and reused over time. Fast convolution algorithms are products with fixed transforms, and for Winograd’s F(2×2,3×3)F(2 \times2, 3 \times3) [42] all three transforms have entries in {0,±12,±1}\{0, \pm\frac{1}{2}, \pm1\}, so they are shift trees themselves. The four projections of attention [80] are fully connected layers, and the query, key and value projections read the same input, so they can share partial sums. Batch normalization folds into neighbouring layers at inference [33], and the gains of layer and RMS normalization fold into the column bases of the next layer. What remains outside the tree is small and well delimited: products of two activations, such as attention scores and the gate of a gated MLP, which are not weights and still need multipliers; and a few nonlinear functions, for which integer-only approximations are well studied [36].

Sharing additions, and their limit

Different outputs often need the same partial sum of shifted inputs, and can then share the adder that forms it. Finding such shared sums is the constant matrix–vector multiplication problem, a generalization of multiple constant multiplication [81]. Entries below a common node already share their shifts, so the tree is a natural starting point for this search. There is also a limit, and it mirrors the one for storage in § 3. For matrices without structure, any circuit of additions and bounded shifts needs on the order of n2b/log⁡(nb)n^{2b}/\log(nb) operations for most n×nn \times n matrices of bb-bit integers, and, when bb is not exponentially larger than nn, a classical bucketing construction comes within a constant factor of this [4, 45] (Theorem A.15). Large savings in additions, as in bits, come from structure, and the tree is where structure is recorded.

A first measurement

Does choosing states for circuit cost pay off on real weights? We compared state trees with GPTQ [22] on five linear layers of LLaMA-3-8B, using 128 calibration sequences from FineWeb. GPTQ is designed for storage at a fixed bit width, not for additions, so the comparison asks how many additions a tree saves when it is allowed to target them. We use the flattest tree on purpose: a flat signed-digit tree has one scale per row and leaves that are short sums of signed powers of two. This isolates the circuit price; deeper trees mainly pay off in bits. Both methods are costed by the same rule, one adder per nonzero signed digit of a weight and four adders per real-valued scale, which counts one adder per output more than the circuit of Equation (3), equally for both. For GPTQ the rule is applied to its quantized weights and group scales. For the tree, we choose the states to minimize the layer error fHf_H of Equation (2) plus a price for every nonzero digit, and adjust the price until the layer error equals that of GPTQ at 4, 3 and 2 bits. The states are chosen in a single GPTQ-style pass: column by column, every weight becomes zero or one to three terms ±2e\pm2^e times its row scale, with ee from 1 down to −11-11, whichever adds least to the layer error plus the price of its digits, and the remaining columns receive the usual error update. The choice separates over the weights of a column, so each column is solved exactly given the columns before it. The row scale starts at the largest magnitude in its row and is refitted by least squares in the metric of HH after the pass. The weights of the tree are hardwired, so its storage is not counted. GPTQ is run in its plain form, with an asymmetric min–max grid for every group of 128 weights, no clipping or grid search, natural column order and 1% damping; its digits are counted in the non-adjacent form of the signed code q∼zq \sim z.

Table 5 shows the result. At equal layer error, the tree needs 9–15% fewer adders than GPTQ at 3- and 4-bit accuracy on the three typical matrices, and 30–35% fewer at 2-bit accuracy, a regime in which GPTQ itself already degrades the model severely, so that the 3- and 4-bit columns are the practical operating points. The gains are largest on the two matrices with strong outliers, up to 55% at 3-bit and 63% at 2-bit accuracy on the down projection of the first layer. Part of the saving comes from the scales, since GPTQ needs a scale for every group of 128 weights and the tree one per row. Counting weight digits alone, the tree still needs 6–7% fewer adders on the typical matrices at 4-bit accuracy, 9–11% at 3-bit and 23–29% at 2-bit accuracy, and up to 53% and 59% on the outlier matrices at 3- and 2-bit accuracy. We attribute this to where the digits go: a uniform grid gives every weight the same number of digits, whereas the tree spends digits where they reduce the error most. A second observation concerns the shape of the tree, and it confirms what the two-weight example of § 2 suggested. In our trials, the flattest tree was also the best one for additions: the shared exponents of deeper trees saved stored bits but not additions, because a shift costs nothing in a circuit with fixed weights. Bits and additions are two different prices, and the representation makes both visible, so that the optimizer of § 5 can trade one against the other. Counting additions leaves out their width, which grows with the spread of the shifts that an adder combines, and the truncation far of low-order bits by right shifts in fixed point. The counts are therefore a first-order proxy for circuit size, not a measurement of area. The flat tree also differs from earlier multiplier-free quantizers. APoT [44] draws its levels from a fixed additive power-of-two grid shared by a whole layer and learned with quantization-aware training, and ShiftAddLLM [89] writes weights as sums of binary matrices with power-of-two group scales; the flat tree chooses the number and position of the signed digits separately for every weight and prices each digit against the layer error, so a zero costs nothing and an outlier costs one digit. A full study of circuits for whole networks, including area, energy, these effects and measured comparisons with quantizers that also target additions [44, 18, 89], is left to a separate paper.

Matrixat GPTQ-4 errorat GPTQ-3 errorat GPTQ-2 error
layer 1, gate projection1.17 → 1.05 (−10%)0.80 → 0.69 (−14%)0.42 → 0.29 (−30%)
layer 15, gate projection1.16 → 1.05 (−9%)0.80 → 0.69 (−14%)0.42 → 0.29 (−30%)
layer 15, down projection1.16 → 1.05 (−10%)0.79 → 0.67 (−15%)0.41 → 0.27 (−35%)
layer 30, down projection1.15 → 0.93 (−20%)0.79 → 0.56 (−29%)0.40 → 0.16 (−61%)
layer 1, down projection1.16 → 0.79 (−32%)0.80 → 0.36 (−55%)0.41 → 0.15 (−63%)

Table 5. Adders per weight at equal layer error on LLaMA-3-8B: GPTQ → a flat state tree whose states were chosen for circuit cost. The last two matrices have strong outliers. Counts are rounded to two decimals; percentages are computed from the unrounded counts.

Choosing states is finding a ground state

In the previous two sections the states of a tree were chosen by some solver, either for accuracy at a given size or for accuracy at a given number of additions. It is worth asking what kind of problem these solvers face. The answer is precise and well studied: choosing the states of a tree is the problem of finding the lowest-energy configuration of a Boltzmann machine.

Boltzmann machines

A Boltzmann machine [1] consists of NN binary units z1,…,zNz_1,\ldots,z_N, each either off (zp=0z_p=0) or on (zp=1z_p=1); a configuration z=(z1,…,zN)\boldsymbol{z}=(z_1,\ldots,z_N) fixes the state of every unit. Each configuration has an energy

E(z)=∑p<qJpqzpzq+∑phpzp,(4)E(\boldsymbol{z})=\sum_{p<q}J_{pq}z_pz_q+\sum_p h_pz_p, \tag*{(4)}

where the indices pp and qq run over the units. The coupling JpqJ_{pq} is the energy added when units pp and qq are on together: a positive coupling discourages them from being on at the same time, and a negative one encourages it. The field hph_p is the energy added when unit pp is on by itself. The machine assigns each configuration the probability P(z)=exp⁡(−E(z)/T)/ZP(\boldsymbol{z})=\exp(-E(\boldsymbol{z})/T)/Z, where the temperature T>0T>0 sets how strongly low energies are preferred, and ZZ, the sum of exp⁡(−E(z)/T)\exp(-E(\boldsymbol{z})/T) over all configurations, makes the probabilities add up to one. As TT falls, the probability concentrates on the configurations of lowest energy, the ground states. A higher-order machine [68] also has terms that couple three or more units, such as JpqrzpzqzrJ_{pqr}z_pz_qz_r. Finding a ground state of Equation (4) is the problem known as QUBO (quadratic unconstrained binary optimization); written with spins σp=2zp−1∈{−1,+1}\sigma_p=2z_p-1\in\{-1,+1\} instead of bits, it is the Ising model [49].

A machine with two weights

Return to the two weights of Figure 2, and suppose that their mantissas must be shortened, so that each weight has to choose between its two nearest representable values. Each choice is a binary unit: z1z_1 for w1w_1 and z2z_2 for w2w_2. The natural energy is the layer error of Equation (2). For the two inputs x1,x2x_1,x_2 it reads

fH=e12H11+2e1e2H12+e22H22,f_H=e_1^2H_{11}+2e_1e_2H_{12}+e_2^2H_{22},

where e1e_1 and e2e_2 are the errors of the two weights, each affine in its own unit. The first and last terms depend on one unit each. The middle term couples them, with a strength set by H12H_{12}, the correlation between the two inputs. If the inputs are uncorrelated, H12=0H_{12}=0 and each weight can be rounded on its own, which is exactly what rounding to the nearest value does. If they are correlated, the best choice for one weight depends on the choice made for the other: the two units are coupled, and the error is a small Boltzmann machine. Now let the shared node take part as well, with a bit bb that either keeps or halves both weights. Each weight is then the product of the node’s factor and its leaf, so the error contains products of bb with z1z_1 and z2z_2: terms that couple three units at once. These higher-order terms follow the path from the shared node to its leaves. These two observations, couplings from the data and higher-order terms from the tree, are all there is to the general case.

The Boltzmann machine of a tree

Every state of a tree can be written with binary units. A leaf with KK possible values becomes a group of KK units of which exactly one is on. A shift bit with multiplier rbr^b is affine in its bit, rb=1+(r−1)br^b = 1 + (r - 1)b. A gate multiplies its subtree by a bit, and a lookup index is again a group of units of which exactly one is on. Every weight is then a polynomial in the units on its path, and the layer error becomes an energy. One-hot groups need a penalty that keeps exactly one unit on, but many alphabets need none: a leaf {0,±1}\{0, \pm1\} is z−z′z - z' with two free units, zero having two codes, which leaves the energy flat between them and does no harm to the search, and an integer range has a binary encoding that is linear in its units.

Property 6 (The Boltzmann machine of a tree). With the node states fixed, the layer error is a quadratic function of the leaf units: a pairwise Boltzmann machine in which leaves of the same row are coupled through the input statistics HH, and, under the Kronecker-factored error, leaves of different rows are also coupled through the output statistics GG. With the node states free as well, the error is a higher-order Boltzmann machine whose higher-order terms follow the paths of the tree; auxiliary units reduce it to a pairwise machine [6, 31]. In both cases, for given row scales and column bases, the ground state is the best matrix the tree can represent (Theorem A.16).

Figure 10 shows the same division of labour as the two-weight machine, now for a larger tree: the tree decides which units exist and where the higher-order terms are, and the data decide how strongly the units interact.

The Boltzmann machine of a state tree, drawn for two columns of a four-row version

Figure 10. The Boltzmann machine of a state tree (Property 6), drawn for two columns of a four-row version of the running example. The tree decides which units exist and where the higher-order terms are; the data decide how strongly the units interact.

Familiar solvers, and new ones

Seen through this machine, familiar solvers are particular ways of lowering its energy. Rounding to the nearest value ignores all couplings, as in the uncorrelated case above. GPTQ visits the columns in turn and fixes each one given the columns already fixed, carrying their errors forward to the columns that remain; it is a single sweep at zero temperature that never revisits a decision, and, run in reverse column order and without clipping, it coincides with Babai’s nearest-plane algorithm for lattices [5, 10]. Adaptive rounding writes the rounding of a layer as a QUBO [59]; in the present language, this is a flat tree whose leaves choose between rounding up and rounding down, exactly the two-weight machine without its shared node.

The machine also suggests solvers that are rarely used for this problem: Gibbs sampling, simulated annealing [38], parallel tempering, and sampling at a finite temperature to obtain many good solutions instead of one. Because the energy covers every kind of decision, including zeros, shared shifts, codebook indices and selectors, the same solver can choose all of them together.

Quantum optimizers

Quantum annealers [34] and the quantum approximate optimization algorithm [19] search for low-energy states of Ising models. After the substitution σ=2z−1\sigma= 2z - 1 and, when node states are free, a standard reduction to pairwise terms, the energy of a tree has exactly this form; running it on a device still requires an embedding of the couplings and their representation at finite precision. A whole weight matrix has far more units than present devices have qubits, but the tree also supplies a decomposition: one group of rows and one block of columns at a time, with GPTQ-style error feedback carrying the effect of each solved block to the rest. Each block is a dense machine of tens to a few hundred units, the size handled by current annealers and small variational circuits, inside a classical loop that walks the tree. These sizes hold when the node states of a block are fixed, so that its machine is pairwise from the start; freeing them adds auxiliary units and penalty couplings, which enlarge the machine and widen the range of couplings a device must represent. A single large matrix splits into a very large number of such blocks, and whether quantum solvers will outperform classical ones on them is an open question. What the representation provides is the problem in the form these devices accept, together with a decomposition that matches their size.

The same tree helps in the opposite direction, when a network has to be evaluated inside a quantum algorithm. There the weights are classical constants, and multiplying a quantum register by a constant is compiled into shifted additions, whose cost grows with the number of nonzero digits of the constant, while a shift is only a relabelling of qubits [11]. A state tree controls exactly this number.

Finally, the temperature of the machine points to a different use of the tree: not only to choose the states of a network that has already been trained, but to learn them in the first place. This is the subject of the next section.

Learning in the space of states

So far a tree was fitted to a network trained in the usual way. The representation also invites training the tree directly. Ternary networks trained from scratch [51, 52] already do this for the simplest tree, one scale above leaves {−1,0,1}\{-1, 0, 1\}, and quantization-aware training does it for group-quantization trees. Deeper trees can be trained in the same way, through a relaxation of the discrete choices: every alphabet receives a soft distribution over its states, which is sharpened as a temperature is lowered. Training then moves through the space of decisions, and the trained object is already the deployed one: its storage cost, its circuit and its format are fixed by the tree. The temperature plays the same role as in the Boltzmann machine of § 7, and connecting the two precisely for training losses is a natural direction for future work.

Early evidence and directions

The previous sections developed one idea from several sides. This section shows that it already delivers, on real models and beyond them (Table 6 and Table 8). We present five results, each followed by what it means in practice. They are selected examples rather than a general claim, and each will be reported in full in a separate paper; together, they show that a single representation brings concrete gains in places as different as model serving, compression, model tuning, hardware design and image coding.

CodecImplementationBits per pixelDecoding (Gpixel/s)
JPEG XL, effort 9 [3]libjxl 0.11.2, CPU8.66—
Ours (tree analogue)GPU (A100), batched9.472.9
WebP, lossless [64]libwebp 1.6.0, CPU9.50—
JPEG 2000 [72]OpenJPEG 2.5.4; GPU / CPU9.570.10 / ≈0.04
HTJ2K [73]OpenJPH 0.26.3; GPU decoding10.530.45

Table 8. Lossless image coding on Kodak [39]; every result was checked to be bit-exact. GPU decoding of JPEG 2000 and HTJ2K uses nvImageCodec with the nvJPEG2000 backend. All GPU timings decode the 24 images in batched calls; one image per call, JPEG 2000 and HTJ2K reach 0.03 and 0.39 Gpixel/s. GPU timings run from compressed bytes in host memory to the decoded image in GPU memory (median of 10 runs, A100-SXM4-40GB); the CPU timing, on 16 cores of a shared AMD EPYC 7742, is indicative. For a single small image, GPU HTJ2K keeps an advantage that the batched timings do not show.

Lossless storage: less memory and faster serving, for free. The simplest use of the tree involves no approximation at all. § 2 showed that two neighbouring weights can share their exponent and still be reproduced exactly. At scale, a BF16 matrix stored with one shared exponent per 64 weights and, per weight, a 4-bit state and an 8-bit leaf needs 12.13 instead of 16 bits per weight over whole models, and every weight decodes to exactly its BF16 value. Weights whose exponent lies 15 or more below the largest in their group, about 0.01% of them and including exact zeros, are kept exactly in a short side list, whose cost is included (Section A.4). Fewer bytes matter because generating tokens is limited by memory traffic rather than by arithmetic. Our CUDA kernel decodes the tree with byte-parallel integer operations, feeds the tensor cores directly and runs at 97% of the bandwidth floor of the tree bytes. Reading 12.13 instead of 16 bits per weight bounds the gain from the format alone at 16/12.13≈1.32×16/12.13 \approx1.32\times. Table 7 separates the two sources of speed on layer 15 of LLaMA-3-8B, with every kernel timed in the same run. Against our own kernel reading plain BF16, the tree makes matrix–vector products 1.03–1.27× faster at batch sizes 1 to 8, below the bound; this is the gain of the format. Against cuBLAS the gain is 1.05–1.51×, because on the large MLP matrices our kernel design is itself up to 1.27× faster than cuBLAS, while on the attention projections cuBLAS is already as fast and the whole gain comes from the format. At batch 32 the product becomes compute-bound, and the tree is up to 15% slower than our BF16 kernel. On a CPU, products become 1.24–1.27× faster than PyTorch. In end-to-end serving with vLLM, generation becomes 1.23× faster at batch size 1 for both Llama-3.2-1B [48] and Qwen3.5-9B [62], and 1.17–1.21× faster at batch size 8. When serving becomes compute-bound, at batch size 32, the tree runs at a speed comparable to BF16. These end-to-end gains include both the format and our kernel design; separating them requires serving the same model with our kernel reading BF16, which we leave to the companion paper.

MatrixBatchcuBLAS (μ\mus)own BF16 (μ\mus)tree (μ\mus)kernel own BF16 vs cuBLASformat tree vs own BF16total tree vs cuBLAS
gate 14336 × 40961106.085.670.31.24×1.22×1.51×
8107.884.772.41.27×1.17×1.49×
16108.986.678.41.26×1.10×1.39×
32117.298.3113.71.19×0.86×1.03×
down 4096 × 143361102.889.870.91.14×1.27×1.45×
8103.089.973.31.15×1.23×1.41×
32111.7101.4118.61.10×0.85×0.94×
q 4096 × 4096128.928.224.31.02×1.16×1.19×
829.328.826.31.02×1.10×1.11×
k 1024 × 4096110.710.510.21.02×1.03×1.05×

Table 7. Matrix–vector products of layer 15 of LLaMA-3-8B on an A100, all three kernels timed in the same run. “Own BF16” is our kernel with the same structure reading plain BF16, so kernel isolates kernel engineering and format isolates the 12.13-bit tree (bounded by 16/12.13≈1.32×16/12.13 \approx1.32\times); their product is the total gain over cuBLAS. At batch 32 the product is compute-bound and decoding costs more than the saved bytes gain.

Impact. A BF16 model can be stored with 24% less disk and served with 24% less weight memory and up to 23% higher throughput at the small batch sizes of latency-sensitive serving, with tiny slowdown in the compute-bound regime. Because the weights are exactly the same, all of this comes without any loss of accuracy, calibration or retraining, and the memory it frees can hold a longer key–value cache or a larger batch. The vLLM plugin is enabled with a single flag and is publicly available.3

Compression: better low-bit models, without training. § 5 argued that once every compression method is an edit of the same object, a single optimizer can choose among all of them for every matrix. A dynamic program over the whole of LLaMA-3-8B does exactly this: at 3.25 bits per weight and without any training, it lowers perplexity by 14–17% relative to the strongest GPTQ configuration in the same pipeline, and closes 58% of GPTQ’s gap to FP16 on WikiText-2 (from 1.95 to 0.81). The accuracy cost of every option is measured on the calibration loss LL, as 12[L(W+Δ)+L(W−Δ)]−L(W)\frac{1}{2}[L(W+\Delta)+L(W-\Delta)]-L(W) with Δ\Delta the error of the option, which removes the first-order term and puts all matrices and methods on one scale. The menu of every matrix combines quantization, pruning and low-rank edits, with no rotation and no trellis-coded quantizer, and will be described in a follow-up paper; every option the solver picks is built and measured, and the problem is solved again until the whole plan has been measured (Section A.4). Instead of one method being forced on every matrix, each matrix receives the edit that buys the most accuracy for its bits.

Impact. At a fifth of the size of FP16, the compressed model is much closer to the original than GPTQ at the same size, with no training at all. And because every method is just one more edit on the menu, a new compression method does not have to compete with the existing ones: it can be added to the optimizer and combined with all of them.

Discrete optimization: a better model in the same bytes. A compressed model written as a tree is a set of discrete states, and § 7 showed that choosing them is a ground-state problem. A model can therefore keep improving after compression without changing its format or its size. In In̶s̶i̶g̶h̶t̶ healing, every step models the KL divergence to the original model by its gradient and its Kronecker factors, estimated on about 45k tokens, and gives every movable code one unit that either keeps it or moves it by one level within its own grid. The energy is then the Kronecker-factored machine of Property 6 with an added linear term; it is solved with ballistic simulated bifurcation, a quantum-inspired classical solver [26, 27], started from a greedy update, and a step is kept only if the KL on a validation set improves. As an illustration, we compressed Qwen2.5-1.5B-Instruct without training to 2.44 bits per weight with a wider menu, whose details will follow in a separate paper, and let only its GPTQ-family leaves, 6.8% of the weights, move. Forty such steps changed 46,239 stored codes, about 0.004% of the model’s codes, and lowered the validation KL to the original model by 24%; since this KL guided the search, we report it as a validation result only. On benchmarks that play no part in the search, healing improved perplexity on all three corpora (on WikiText-2 from 13.74 to 12.85) and raised GSM8K accuracy by 7.9 points, from 13.95 to 21.83. GSM8K has 1,319 problems, so each of these accuracies carries a 95% binomial interval of about ±2 points and the gain is about five standard errors; it comes from a single run. The solver reached lower energies than a greedy update on 371 of 516 real instances and higher ones on none, but end to end the choice of solver matters little. The reported run keeps, at every step, the best of no move, the greedy update and simulated bifurcation; run alone in a separate ablation, greedy updates reach a validation KL of 0.378 and GSM8K 20.3, and simulated bifurcation 0.371 and 21.0. With the same number of tokens, tuning only the continuous scales of the same model helps more (KL 0.325, GSM8K 27.5); healing changes the discrete codes instead, so the two act on different parameters. Annealed Gibbs sampling over the states of a 3.3-bit tree, six sweeps followed by two of coordinate descent, reduced the output error of the down projection of the first layer of LLaMA-3-8B by 43%.

Impact. A compressed model can be repaired after the fact with the same file size, the same format and the same kernels; the repair touches a few tens of thousands of codes and can be shipped as a tiny patch. The Boltzmann reading turns such repairs into a standard discrete problem, open to solvers from statistical physics today and to quantum annealers as they mature, although on this first instance simple solvers already capture most of the gain.

Hardware: fewer adders for the same accuracy. At equal layer error, choosing the states of a tree for circuit cost needs 14–55% fewer adders than GPTQ at 3-bit accuracy and 30–63% fewer at 2-bit accuracy, the upper ends on the two matrices with strong outliers (§ 6.5). The saving is structural: every weight carries its own power of two, so an outlier costs one adder instead of forcing extra precision on its whole group; zeros and shifts are free; and no scale multipliers per group remain.

Impact. For chips that hardwire a model, the number of adders is a first-order measure of silicon area and energy. The tree lets a designer choose the weights for the circuit rather than for storage, and spend adders only where accuracy needs them.

Beyond neural networks: fast lossless images. Nothing in the representation is specific to weights: any array of integers can be written as paths of decisions. We tested this on lossless image coding, using the same path that § 2 applied to a weight. After a reversible colour transform chosen per image, each pixel is predicted coarse to fine from four already decoded neighbours, in twelve passes per channel, each of which decodes fully in parallel. The prediction residual, mapped to a non-negative integer, is then written as a path of two decisions: its state is its bit length, the counterpart of an exponent, and its leaf holds the bits below the leading one, the counterpart of a mantissa. There is one twist. Instead of storing a shared node for a group of pixels, the decoder infers it: a context computed from the decoded neighbours, their range and their recent residual activity, plays the role of the node and selects the probability model under which the state and the first leaf bit are coded with interleaved rANS [14, 25]; the remaining leaf bits are stored as they are. The shared decision thus becomes shared knowledge rather than shared storage. The codec is therefore an analogue of a state tree rather than an instance of Theorem A.1: its decisions are entropy-coded under inferred contexts instead of being stored as states. The probability models come from a small codebook trained once on 40 DIV2K images [2], disjoint from the test sets.

The result is a codec whose main strength is speed (Table 8). On Kodak it needs 9.47 bits per pixel, less than lossless WebP (9.50), JPEG 2000 (9.57) and HTJ2K (10.53), though 9% more than JPEG XL at its strongest setting (8.66); on the CLIC professional validation set [75] it needs 8.51, against 7.88 for JPEG XL and 8.81 for lossless WebP (Section A.4). Decoding batched images on an A100 runs at 2.9 Gpixel/s on both datasets, against 0.45 for HTJ2K and 0.10 for JPEG 2000 on the same GPU, and about 0.04 for JPEG 2000 on sixteen CPU cores. For a single small image, GPU HTJ2K keeps an advantage that the batched timings do not show, and the strongest context-modelling coders, JPEG XL and paq8px, still compress photographs better.

Impact. Exact images decode about 6× faster than with HTJ2K and almost 30× faster than with JPEG 2000 on the same GPU, at a better compression ratio than both. Training pipelines in which data loading is the bottleneck, and the streaming of images and textures, gain directly. More broadly, the result shows that the representation is a property of numbers, not of neural networks.

What comes next. These results cover only part of what the representation opens, and each suggests a direction of its own.

  • Learning in tree space. Training deep trees from scratch (§ 8) would let networks discover which decisions to share, instead of having the sharing imposed after training.

  • From model to silicon. Compiling whole models into hardwired adder circuits would turn § 6 into a design flow with explicit trade-offs between area, energy and accuracy.

  • Sparse model updates. Since tuning moves only a tiny fraction of the states, updates and fine-tuning deltas can be shipped as small edits of a tree.

  • Beyond weights. Activations and the key–value cache could be written as trees on the fly, and the image result suggests that other numerical data, such as scientific arrays, audio and video, can benefit from the same structure.

  • Quantum hardware. The block subproblems of § 7 are natural first workloads for quantum annealers and variational circuits as they grow.

In every case the gain has the same source: the decisions that numbers share are made explicit, stored once, and optimized as discrete states.

Related work

TWIG brings together ideas from several lines of work that have so far developed separately. Number formats with shared parts. Group quantization shares a scale, and block floating point and the microscaling formats share an exponent across a block of weights [65, 66]. These are state trees with two levels of decisions (Table 2). Shared microexponents [67] and HiFloat4 [50] go deeper, with one or two further levels of one-bit shifts shared by sub-blocks, and HiFloat4 reports higher accuracy than NVFP4 on several language models at the same 4.5 bits per weight. TWIG allows sharing at any level and of any kind of decision, and makes its cost in bits and in additions explicit.

Path-structured representations. Describing a function or a matrix by paths through a graph with values on its edges, with identical parts stored once, is a classical idea in circuit verification and quantum computing. Edge values are additive in edge-valued decision diagrams [40] and multiplicative in binary moment diagrams [7] and in the decision diagrams that store the matrices of quantum circuits [55]; weighted automata use the same principle to compress images [12]. In numerical linear algebra, hierarchical matrices store low-rank blocks over a tree of index sets [28], and quantized tensor trains write an entry as a product of factors indexed by the binary digits of its position [60, 35], close to the product along a path in Equation (1). Tree-structured and residual vector quantizers [24], and binary-coded quantization, which writes a matrix as a sum of scaled binary matrices [86, 61], share decisions in related ways. TWIG adopts this path structure for the weights of neural networks. What is new is the cost model of bits and additions, the treatment of compression methods as edits of one object, and the reading of state selection as a Boltzmann machine.

Multiplier-free networks. Logarithmic and power-of-two weights [56, 90, 17], sums of power-of-two terms [44], and networks built from additions [9] or from shifts and additions [88, 89] avoid multipliers by choosing a multiplier-free family of weights, during or after training. In the language of this paper these families are particular state trees, and Property 3 explains why sums of power-of-two terms lose no expressive power. Signed-power-of-two coefficients and multiplierless constant multiplication have long been used in digital filter design, where the number of nonzero digits is a cost separate from the word length [46, 81]. Reconfigurable constant-coefficient multipliers bring this to neural networks on FPGAs, restricting weights to coefficients that adders, shifts and multiplexers can apply [18], and lookup-table kernels bring related ideas to processors [61, 85].

Unified and budgeted compression. Optimal Brain Compression treats pruning and quantization in one framework [20], SPDY chooses per-layer settings under a speed budget by dynamic programming [21], and mixed-precision methods allocate bits per layer, for instance by integer programming [87], and ROCKET allocates low-rank truncation across layers as a knapsack problem [91]. TWIG supplies a common object for such choices, so that a single menu can contain edits from every family (§ 5).

Discrete optimization of weights. Adaptive rounding writes the rounding of a layer as a QUBO [59]; GPTQ has been identified with Babaï’s nearest-plane algorithm, under conditions on column order and clipping [10]; Kronecker-factored curvature has been used to round with both input and output statistics [78]; and quantization and pruning have been formulated for simulated and quantum annealing [58, 82]. Property 6 extends the QUBO view to all decisions of a tree, including zeros, shared shifts, codebook indices and selectors.

Conclusion

Neural networks are trained in the continuum but run in a discrete world, and the passage between the two has so far been handled one method at a time. We have proposed to make this passage explicit with a single representation. In TWIG, every weight is the end of a path of small discrete decisions, and weights that belong together share the upper part of their paths, so that each shared decision is stored once and applied once. The idea is simple, and its consequences reach in several directions. The formats in use today are shallow state trees; nothing is lost in the worst case, and shared structure lowers the cost in bits. Read as a compressed model, a tree turns pruning, quantization, factorization, codebooks and sharing into edits of one object, chosen by one optimizer. Read as a circuit, it applies a layer with shifts and additions, apart from one scale per row and per column, with a size bounded by a count read off the tree. Read as an optimization problem, choosing its states is the ground-state problem of a higher-order Boltzmann machine whose interactions follow the paths of the tree, the problem class that annealers and quantum optimizers are built to solve. And because its decisions are explicit, a tree could be trained directly, so that the trained object is already the deployed one, a direction we leave open.

Definitions, statements and proofs

Throughout, W∈Rm×nW \in\mathbb{R}^{m \times n} is a weight matrix (rows are outputs, columns are inputs), I=[m]×[n]I = [m] \times[n] is the set of its entries, and P={0}∪{±2k:k∈Z}\mathcal{P} = \{0\} \cup\{\pm2^k : k \in\mathbb{Z}\} is the set of signed powers of two together with zero. Several statements below are known results restated for state trees: the counting bounds of Theorems A.6 and A.7, the non-adjacent form in Theorem A.8, reduced-rank regression in Theorem A.11 [32], the multiple-choice knapsack problem in Theorem A.13 [69], the bucketing construction in Theorem A.15, and the quadratic form of rounding in Theorem A.16(i) [59]. We include them, with their sources, to keep the paper self-contained. The statements specific to state trees are mainly Theorems A.9 and A.10, Theorem A.14 and Theorem A.16(ii).

Definitions

Definition A.1 (State tree). A state tree TT over II consists of (a) a rooted tree whose leaves are in bijection with II; an internal node may have a single child, so that one group of entries can carry several decisions in sequence; (b) for every node vv, a finite alphabet SvS_v and a value map cvc_v that assigns a real value to each state of vv, possibly depending on the states of the ancestors of vv (a node whose value depends on the states of its ancestors is a lookup); (c) row scales ρ∈Rm\rho\in\mathbb{R}^m and column bases β∈Rn\beta\in\mathbb{R}^n, stored in fixed formats (for example FP16). For an assignment s=(sv)vs = (s_v)_v of states, the represented matrix is W^ij(s)=ρiβj∏v∈π(i,j)cv(s)\widehat{W}_{ij}(s) = \rho_i \beta_j \prod_{v \in\pi(i,j)} c_v(s), where π(i,j)\pi(i,j) is the path from the root to the leaf of (i,j)(i,j). The set of matrices representable by TT is M(T)={W^(s)}\mathcal{M}(T) = \{\widehat{W}(s)\}. The leaf sets of the subtrees of TT form a laminar family of groups of entries, the hierarchy of TT. The depth of TT is the largest number of edges on a path from the root to a leaf, and the height h(v)h(v) of a node is the largest number of edges from vv down to a leaf of its subtree.

The definition is deliberately broad: because a value map may depend on the states of the ancestors, any code that is decoded from the root down can be written as a state tree, so Theorem A.4 is a statement about costs rather than about expressiveness. Some results use the narrower core model, in which no value map depends on the ancestors: Theorems A.9 and A.10 are stated for it, and Theorem A.16(ii) for node values that are affine in one bit or linear in one one-hot group. Trellis codes, whose overlapping windows share bits without nesting, are state trees only as a codebook over a whole block.

Definition A.2 (State-tree graph). State-tree expressions are generated by E::=T∣E+E∣E⋅E∣ref⁡(E)\mathrm{E} ::= \mathcal{T} \mid\mathrm{E} + \mathrm{E} \mid\mathrm{E} \cdot\mathrm{E} \mid\operatorname{ref}(\mathrm{E}): a state tree, a sum node (entrywise sum of operands of equal shape), a product node (matrix product of compatible operands) and a reference to an expression defined elsewhere. An expression in which some part is referenced more than once is a state-tree graph, and the referenced part is a shared subtree. The tables read by lookups are shared subtrees.

Definition A.3 (Costs). Under an assignment ss, a node is inactive if one of its ancestors has value 0 or is inactive, or if its own value map is identically zero given the states of its ancestors; otherwise it is active. The storage cost is bits⁡(s)=∑v activelog⁡2∣Sv∣\operatorname{bits}(s) = \sum_{v\ \mathrm{active}} \log_{2} |S_v|, with each shared subtree counted once, plus the cost of ρ\rho and β\beta in their formats. A decoder that reads the states from the root down knows which nodes are active, so this is the length of a decodable code, up to rounding that joint coding of several states makes negligible. The shape of the tree, including the order of rows and columns, is fixed per matrix shape and is not counted; a data-dependent order of the rows costs at most log⁡2m!\log_{2} m! further bits, and can be folded into the neighbouring layer when every matrix that reads or writes the same dimension uses the same order, as all matrices that read or write the residual stream of a transformer must, including the embedding and the output head. Folding gives one order per dimension, shared by every matrix that reads or writes it (the gate and up projections of a gated MLP, for instance, share theirs); a separate order for each matrix instead costs log⁡2m!/(mn)<log⁡2m/n\log_{2} m!/(mn) < \log_{2} m/n bits per weight, which is negligible for large layers. If every entry is a sum of tijt_{ij} elements of P\mathcal{P} times ρiβj\rho_i\beta_j, the circuit cost is the number of two-input additions used to evaluate x↦W^xx \mapsto\widehat{W}x by Equation (3), which is at most ∑i(∑jtij−1)+\sum_i \left(\sum_j t_{ij}-1\right)^+; sharing partial sums between outputs can reduce it [81].

What state trees express

Proposition A.4 (Existing formats; Property 1). Each of the following is a state tree with at most five levels of decisions on any path (at most three for (i)–(v), except four for HiFloat4) whose storage cost is at most that of the format, and equal to it for (i)–(v): (i) binary floating-point formats, including subnormals; (ii) bb-bit integers with a scale per group, and with a scale and a zero point per group; (iii) block floating point and microscaling formats, including shared microexponents (MX6, MX9) [67] and HiFloat4 [50]; (iv) ternary weights with a scale; (v) codebook formats that store, for every block of dd entries, an index into a table of dd-dimensional vectors; (vi) N:MN:M sparsity, with the kept values in any of the formats above.*

Proof. (i) Give each entry a chain of three nodes: a sign node with values ±1\pm1; an exponent node with values 2e−e02^{e-e_0} (and 21−e02^{1-e_0} for the subnormal exponent code); and a mantissa leaf that is a lookup on the exponent, with value 1+m2−p1+m2^{-p} for normal exponent codes and m2−pm2^{-p} for the subnormal code. Codes reserved for infinities and NaN do not occur as weights, but stay in the alphabet, so the exponent node costs the full exponent field. (ii) A group node whose alphabet is the scale format, above leaves {0,…,2b−1}\{0,\ldots,2^b-1\} or a symmetric integer range. For a zero point, insert below the scale node a node of value 11 whose state is the zero point zz, and make each leaf a lookup with value q−zq-z. (iii) A block node with values 2e2^e (or the block scale) above leaves in the element format; shared microexponents and HiFloat4 insert one or two levels of one-bit shift nodes, one node per sub-block, between the block node and the leaves. (iv) One node holding the scale above leaves {−1,0,1}\{-1,0,1\}. (v) A block node whose state kk indexes the table; each of its dd leaves has a single state and is a lookup that returns its coordinate of the kk-th table vector; the table is a shared subtree. (vi) A group node over MM entries whose state is one of the (MN)\binom{M}{N} admissible masks; the leaves outside the mask have value 0 and are inactive, and the others carry the value format; the mask costs log⁡2(MN)\log_2 \binom{M}{N} bits, no more than the mask field of the format. In cases (i)–(v) the stored states are exactly the fields of the format. □\square

Proposition A.5 (Refinement and sharing). (i) If T′T' is obtained from TT by inserting nodes whose alphabets contain a state of value 1 (independent of the ancestors), or by enlarging alphabets, then M(T)⊆M(T′)\mathcal{M}(T) \subseteq\mathcal{M}(T'). (ii) A tree is contained in any sum node that has it as a summand, provided the other summands can represent 0. (iii) Replacing several copies of a subtree by references to one shared subtree yields a subset of the original set of matrices, and saves the storage of all copies but one.

Proof. (i) Give the inserted nodes their value-one state and copy all other states; the represented matrix is unchanged. (ii) Set the other summands to zero. (iii) A shared assignment is an unshared assignment in which all copies have equal states.

Theorem A.6 (Counting; Property 2). Let Q⊂RQ \subset\mathbb{R} have KK elements. (i) The flat tree (a root of value 11 above leaves with alphabet QQ, and ρ=β=1\rho= \beta= 1) represents every matrix in Qm×nQ^{m \times n} with mnlog⁡2Kmn \log_{2} K bits. (ii) Any encoding, of fixed or variable length, whose codewords have at most BB bits represents at most 2B+1−12^{B+1} - 1 matrices. Representing all of Qm×nQ^{m \times n} therefore needs B≥mnlog⁡2K−1B \ge mn \log_{2} K - 1, and B≥mnlog⁡2KB \ge mn \log_{2} K for fixed-length codes.

Proof. (i) is immediate from the definition. (ii) There are ∑ℓ=0B2ℓ=2B+1−1\sum_{\ell=0}^{B} 2^{\ell} = 2^{B+1} - 1 binary strings of length at most BB, and ∣Qm×n∣=Kmn=2mnlog⁡2K|Q^{m \times n}| = K^{mn} = 2^{mn \log_{2} K}.

Theorem A.7 (Density at the optimal price; Property 2). Let ε∈(0,1]\varepsilon\in(0,1] and Gε={−1+(2k−1)ε:k=1,…,⌈1/ε⌉}G_{\varepsilon} = \{-1+(2k-1)\varepsilon: k = 1,\ldots,\lceil1/\varepsilon\rceil\}. (i) For every WW with ∥W∥max⁡≤1\lVert W\rVert_{\max} \le1, the flat tree with leaf alphabet GεG_{\varepsilon} achieves ∥W−W^∥max⁡≤ε\lVert W - \widehat{W}\rVert_{\max} \le\varepsilon with mnlog⁡2⌈1/ε⌉mn \log_{2}\lceil1/\varepsilon\rceil bits. (ii) Any encoding whose codewords have at most BB bits and which achieves maximum error ε\varepsilon on all such WW has B≥mnlog⁡2(1/ε)−1B \ge mn \log_{2}(1/\varepsilon) - 1. (iii) The gap between (i) and (ii) is at most mnlog⁡2(1+ε)+1mn \log_{2}(1+\varepsilon) + 1 bits. (iv) For a general WW, a root node with a power-of-two value 2e2^{e}, where 2e−1<∥W∥max⁡≤2e2^{e-1} < \lVert W\rVert_{\max} \le2^{e}, gives maximum error at most 2ε∥W∥max⁡2\varepsilon\lVert W\rVert_{\max}, at the additional cost of storing ee.

Proof. (i) Consecutive points of GεG_{\varepsilon} are 2ε2\varepsilon apart, the first lies at −1+ε-1+\varepsilon and the last at least at 1−ε1-\varepsilon, so every u∈[−1,1]u \in[-1,1] is within ε\varepsilon of GεG_{\varepsilon}. (ii) The max-norm balls of radius ε\varepsilon around the codewords cover [−1,1]mn[-1,1]^{mn}; each has volume (2ε)mn(2\varepsilon)^{mn}, so there are at least ε−mn\varepsilon^{-mn} codewords, and the bound follows as in Theorem A.6. (iii) log⁡2⌈1/ε⌉≤log⁡2(1/ε+1)=log⁡2(1/ε)+log⁡2(1+ε)\log_{2}\lceil1/\varepsilon\rceil\le\log_{2}(1/\varepsilon+1) = \log_{2}(1/\varepsilon) + \log_{2}(1+\varepsilon). (iv) Apply (i) to 2−eW2^{-e}W.

Theorem A.8 (Sums of shift trees; Property 3). (i) For every real x≠0x \ne0 and t≥1t \ge1 there are p1,…,pt∈Pp_{1},\ldots,p_{t} \in\mathcal{P} with ∣x−∑τpτ∣≤3−t∣x∣\left|x-\sum_{\tau}p_{\tau}\right| \le3^{-t}|x|. (ii) Every integer zz with ∣z∣<2b|z| < 2^{b} is a sum of at most ⌈(b+1)/2⌉\lceil(b+1)/2\rceil nonzero elements of P\mathcal{P}, and of b/3+O(1)b/3 + O(1) on average over uniformly random zz [63]. (iii) Hence for every WW and t≥1t \ge1 there is a sum of tt flat trees with values in P\mathcal{P} (the finitely many terms that occur form their alphabets), W^=diag⁡(ρ)(∑τ=1tPτ)diag⁡(β)\widehat{W} = \operatorname{diag}(\rho)\left(\sum_{\tau=1}^{t} P_{\tau}\right)\operatorname{diag}(\beta), such that ∣Wij−W^ij∣≤3−t∣Wij∣|W_{ij}-\widehat{W}_{ij}| \le3^{-t}|W_{ij}| for all entries; every matrix diag⁡(ρ)Zdiag⁡(β)\operatorname{diag}(\rho)Z\operatorname{diag}(\beta) with integer entries ∣Zij∣<2b|Z_{ij}| < 2^{b} is represented exactly with t=⌈(b+1)/2⌉t = \lceil(b+1)/2\rceil; and x↦W^xx \mapsto\widehat{W}x is computed with shifts, at most ∑i(∑jtij−1)+\sum_{i}(\sum_{j}t_{ij}-1)^{+} additions, where tij≤tt_{ij} \le t is the number of nonzero terms of entry (i,j)(i,j), and m+nm+n multiplications.

Proof. (i) If ∣x∣∈[2k,2k+1]|x| \in[2^{k},2^{k+1}], the nearer of 2k2^{k} and 2k+12^{k+1}, with the sign of xx, is within 2k−12^{k-1} of xx, and the distance relative to ∣x∣|x| is largest, 1/31/3, at ∣x∣=3⋅2k−1|x| = 3 \cdot2^{k-1}. So one term leaves a residual of at most ∣x∣/3|x|/3; repeat on the residual, and use the term 00 once the residual vanishes. (ii) The non-adjacent form of zz has at most b+1b+1 signed binary digits, no two adjacent ones nonzero, and its average density of nonzero digits is 13\frac{1}{3} [63]. (iii) Apply (i) or (ii) to every entry of diag⁡(ρ)−1Wdiag⁡(β)−1\operatorname{diag}(\rho)^{-1}W\operatorname{diag}(\beta)^{-1} (ρ=β=1\rho=\beta=1 is allowed); zero entries take the term 00. In the product, every term is a shifted and signed copy of βjxj\beta_jx_j added into the accumulator of yiy_i.

Proposition A.9

Proposition A.9 (Reach of shared shifts; Property 4). Consider one column of a perfect binary tree of depth DD, with a shift bit be∈{0,1}b_e \in\{0,1\} (multiplier 2−be2^{-b_e}) on every edge and leaves in {0,±1}\{0,\pm1\}. For a leaf ℓ\ell let kℓ=∑e∈π(ℓ)bek_\ell= \sum_{e \in\pi(\ell)} b_e, and let LL be the set of nonzero leaves. Integer exponents (kℓ)ℓ∈L(k_\ell)_{\ell\in L} are realizable if and only if 0≤kℓ≤D0 \le k_\ell\le D for every ℓ∈L\ell\in L and, for every node vv with subtree TvT_v and height h(v)h(v),

max⁡ℓ∈Tv∩Lkℓ−min⁡ℓ∈Tv∩Lkℓ≤h(v).\max_{\ell\in T_v \cap L} k_\ell- \min_{\ell\in T_v \cap L} k_\ell\le h(v).

Proof. Let pvp_v be the number of active bits on the path from the root to vv. Necessity: every leaf ℓ\ell below vv has pv≤kℓ≤pv+h(v)p_v \le k_\ell\le p_v + h(v). Sufficiency: choose the pvp_v from the top, keeping max⁡Tv∩Lk−h(v)≤pv≤min⁡Tv∩Lk\max_{T_v\cap L} k-h(v) \le p_v \le\min_{T_v\cap L} k (no condition if Tv∩LT_v\cap L is empty); this holds at the root with p=0p=0 because 0≤kℓ≤D0 \le k_\ell\le D. For a child cc of vv with Tc∩L≠∅T_c\cap L \ne\emptyset, the admissible interval [max⁡Tc∩Lk−h(c),min⁡Tc∩Lk][\max_{T_c\cap L} k-h(c),\min_{T_c\cap L} k] is nonempty by the condition at cc; its left end is at most max⁡Tv∩Lk−h(v)+1≤pv+1\max_{T_v\cap L} k-h(v)+1 \le p_v+1 and its right end at least min⁡Tv∩Lk≥pv\min_{T_v\cap L} k \ge p_v. Hence it contains pvp_v or pv+1p_v+1; take that value as pcp_c and set b(v,c)=pc−pvb(v,c)=p_c-p_v. At a leaf the interval is the single point kℓk_\ell. Bits on edges into subtrees without nonzero leaves are arbitrary.

Proposition A.10 (Two equivalent encodings; Property 4). For one column of a perfect binary tree with mm leaves, the encoding of Theorem A.9 (edge bits, leaves {0,±1}\{0,\pm1\}) and the encoding with one shift bit per internal node and leaves {0,±1,±12}\{0,\pm1,\pm\frac{1}{2}\} represent the same set of columns, up to a factor 12\frac{1}{2} per column that can be absorbed into βj\beta_j. The first stores 2(m−1)+mlog⁡232(m-1)+m\log_2 3 bits and the second (m−1)+mlog⁡25(m-1)+m\log_2 5, about 3.58 and 3.32 bits per weight for large mm, with leaves coded jointly.

Proof. A bit on the edge into an internal node cc multiplies exactly the subtree of cc, as the node bit of cc does; a bit on the edge into a leaf multiplies only that leaf, which is the leaf magnitude 12\frac{1}{2}. This maps every edge-bit assignment to a node-bit assignment with root bit 0 that represents the same column; conversely, a node-bit assignment with root bit 1 is one with root bit 0 times 12\frac{1}{2}. The map is onto but not one-to-one, because a zero leaf ignores the bit on its edge.

Theorem A.11 (Rank; § 3). (i) A sum node of rr product nodes ukvkTu_kv_k^{\mathsf T} represents exactly the matrices of rank at most rr. (ii) Let H≻0H \succ0 with H=LLTH=LL^{\mathsf T}. The minimizer of fHf_H over matrices of rank at most rr is W^=[WL]rL−1\widehat{W}=[WL]_rL^{-1}, where [⋅]r[\cdot]_r keeps the rr largest singular values. (iii) Let also G≻0G\succ0 with G=LGLGTG=L_G L_G^{\mathsf T}. The minimizer of tr⁡(G(W−W^)H(W−W^)T)\operatorname{tr}\bigl(G(W-\widehat{W})H(W-\widehat{W})^{\mathsf T}\bigr) over matrices of rank at most rr is W^=LG−1[LGWL]rL−1\widehat{W}=L_G^{-1}[L_GWL]_rL^{-1}.

Proof. (i) is the rank decomposition. (iii) The objective equals ∥LGWL−LGW^L∥F2\lVert L_GWL-L_G\widehat{W}L\rVert_F^2, and W^↦LGW^L\widehat{W}\mapsto L_G\widehat{W}L is a linear bijection that preserves rank, so the Eckart–Young theorem [15] gives the truncated singular value decomposition. (ii) is the case G=IG=I. Singular HH or GG are handled by damping.

Proposition A.12 (Shared subtrees; § 3). Let W1,…,WgW_1,\ldots,W_g have nn columns and input statistics H1,…,Hg⪰0H_1,\ldots,H_g\succeq0, and write Wi≈CiDW_i\approx C_iD with one shared D∈Rr×nD\in\mathbb{R}^{r\times n}. (i) Exact representation is possible if and only if r≥rank⁡[W1;…;Wg]r\ge\operatorname{rank}[W_1;\ldots;W_g]. (ii) For fixed CiC_i, the minimizers of ∑ifHi(CiD)\sum_i f_{H_i}(C_iD) are the solutions of the generalized Sylvester equation ∑i(CiTCi)DHi=∑iCiTWiHi\sum_i(C_i^{\mathsf T}C_i)D H_i=\sum_i C_i^{\mathsf T}W_iH_i. (iii) For g=2g=2, write this equation as ADB+CDE=KADB+CDE=K. If A,B⪰0A,B\succeq0 (for instance C1C_1 of full column rank and H1≻0H_1\succ0), let PTAP=IP^{\mathsf T}AP=I, QTBQ=diag⁡(λ)Q^{\mathsf T}BQ=\operatorname{diag}(\lambda), QTEQ=diag⁡(σ)Q^{\mathsf T}EQ=\operatorname{diag}(\sigma) be the generalized eigendecompositions. Then D=P[(PTKQ)⊘(11T+λσT)]QTD=P[(P^{\mathsf T}KQ)\oslash(\mathbf{1}\mathbf{1}^{\mathsf T}+\lambda\sigma^{\mathsf T})]Q^{\mathsf T}, with ⊘\oslash the entrywise division.

Proof. (i) Wi=CiDW_i=C_iD for all ii if and only if every row of every WiW_i lies in the row space of DD. (ii) The objective is a convex quadratic function of DD; set its gradient to zero. (iii) Substitute D=PXQD=PXQ and multiply by PTP^{\mathsf T} on the left and by QQ on the right to obtain X+diag⁡(λ)Xdiag⁡(σ)=PTKQX+\operatorname{diag}(\lambda)X\operatorname{diag}(\sigma)=P^{\mathsf T}KQ, which is solved entrywise; the denominators are at least 1 because λ,σ≥0\lambda,\sigma\ge0, as CC and EE are positive semidefinite.

Compression, circuits and Boltzmann machines

Theorem A.13 (One optimizer; Property 5). Let every matrix μ\mu have a finite menu Oμ\mathcal{O}_\mu of options with sizes bμ(o)b_\mu(o) and accuracy costs cμ(o)c_\mu(o), and consider min⁡∑μcμ(oμ)\min\sum_\mu c_\mu(o_\mu) subject to ∑μbμ(oμ)≤B\sum_\mu b_\mu(o_\mu)\le B. (i) Replacing every menu by its Pareto set, the options not dominated in both

:::񎟿

size and cost, does not change the optimum. (ii) Dynamic programming over a grid of UU size units solves the problem exactly, with sizes rounded up to the grid so that its solutions are feasible, in O(U∑μ∣Pareto⁡(Oμ)∣)O(U\sum_{\mu}|\operatorname{Pareto}(O_{\mu})|) time [69]; its value lies between the optima of the unrounded problem for the budget BB and for BB reduced by one grid unit per matrix. (iii) The optimum is at most the cost of any single method or uniform setting that fits the budget.

Proof. (i) Replacing an option by one that dominates it keeps the budget and does not increase the cost. (ii) The recursion DP⁡μ(u)=min⁡o{DP⁡μ−1(u−⌈bμ(o)⌉)+cμ(o)}\operatorname{DP}_{\mu}(u)=\min_{o}\{\operatorname{DP}_{\mu-1}(u-\lceil b_{\mu}(o)\rceil)+c_{\mu}(o)\} enumerates all choices. Its solutions are feasible for BB, and a choice that fits BB reduced by one unit per matrix still fits after rounding up, since each size grows by less than one unit. (iii) One method applied to every matrix is one feasible choice.

Theorem A.14 (Shared subtrees in the optimizer; Property 5). Let the candidate groups for shared subtrees form a forest whose leaves are single matrices, and let every internal node vv offer a set SvS_v of (size, cost) options, each sharing one subtree among all matrices below vv. With additive costs, the recursion Pareto⁡(v)=Pareto⁡(⨁c∈ch⁡(v)Pareto⁡(c)∪Sv)\operatorname{Pareto}(v)=\operatorname{Pareto}(\bigoplus_{c\in\operatorname{ch}(v)}\operatorname{Pareto}(c)\cup S_v), with ⊕\oplus the Minkowski sum of (size, cost) sets and Pareto⁡(μ)=Pareto⁡(Oμ)\operatorname{Pareto}(\mu)=\operatorname{Pareto}(O_{\mu}) at the leaves, followed by Theorem A.13 over the roots, is exact over all configurations in which the shared groups are pairwise disjoint.

Proof. In an admissible configuration, the matrices below vv are either covered by one option at vv or split among the children of vv with independent configurations whose sizes and costs add. By induction, the attainable pairs below vv are (⨁cCc)∪Sv(\bigoplus_c C_c)\cup S_v, where CcC_c is the set of attainable pairs below cc, and by Theorem A.13(i) it suffices to keep Pareto sets at every step. With sizes rounded up to the grid of Theorem A.13 once, in the menus, all sums stay on the grid and every Pareto set has at most U+1U+1 points.

Proposition A.15 (Limits of shift-and-add circuits; Section 6). (i) Consider straight-line programs whose instructions add or subtract two earlier values (inputs or results), each shifted by at most SS positions. If such a program of length LL computes x↦Wxx\mapsto Wx exactly, then for all but a vanishing fraction of W∈{0,…,2b−1}N×NW\in\{0,\ldots,2^b-1\}^{N\times N}, Llog⁡(NLS)=Ω(N2b)L\log(NLS)=\Omega(N^2b); for SS polynomial in NN and bb this gives L=Ω(N2b/log⁡(Nb))L=\Omega(N^2b/\log(Nb)). (ii) O(N2b/log⁡N)O(N^2b/\log N) additions suffice: split WW into bb binary matrices, group g≈log⁡2N−log⁡2log⁡2Ng\approx\log_2N-\log_2\log_2N rows, add every input once into the bucket indexed by its gg-bit column pattern, combine the bucket sums into the outputs of the group, and combine the bit planes with shifts [4, 45].

Proof. (i) An instruction is described by two operand indices among at most N+LN+L values, two shifts and a sign, i.e. by O(log⁡(NLS))O(\log(NLS)) bits, and the program also names its NN outputs. So there are 2O(Llog⁡(NLS))+Nlog⁡(N+L)2^{O(L\log(NLS))+N\log(N+L)} programs, while there are 2N2b2^{N^2b} matrices, and different matrices need different programs, since a program determines the map it computes. If L≥N2bL\ge N^2b the second bound holds trivially; otherwise log⁡(NLS)=O(log⁡(Nb))\log(NLS)=O(\log(Nb)) for SS polynomial in NN and bb. (ii) For each of the bb bit planes and each of the N/gN/g row groups, adding the NN inputs into 2g2^g buckets takes NN additions, and each of the gg outputs sums at most 2g−12^{g-1} buckets, so the group costs at most N+g2g≤2NN+g2^g\le2N additions by the choice of gg. In total this is O(N2b/g)=O(N2b/log⁡N)O(N^2b/g)=O(N^2b/\log N), plus O(Nb)O(Nb) additions for the bit planes.

Theorem A.16 (The Boltzmann machine of a tree; Property 6). Fix ρ\rho and β\beta, and encode the states of a state tree for WW with binary units: a leaf with values a1,…,aKa_1,\ldots,a_K as a one-hot group zij,1,…,zij,Kz_{ij,1},\ldots,z_{ij,K}; a shift bit with multiplier ρb\rho^b as the affine factor 1+ρ−b1+\rho^{-b}; a gate as a bit that multiplies its subtree; and an index into a fixed table as a one-hot group. As the energy take fHf_H of Equation (2), or fG,H=tr⁡(GEHET)f_{G,H}=\operatorname{tr}(GEH\mathsf{E}^{\mathsf{T}}), plus a penalty λ(∑kzk−1)2\lambda(\sum_k z_k-1)^2 for every one-hot group. (i) With the node states fixed, the energy is quadratic in the leaf units. Write W^ij=∑kvij,kzij,k\widehat{W}_{ij}=\sum_k v_{ij,k}z_{ij,k} with vij,k=ρiβjπijakv_{ij,k}=\rho_i\beta_j\pi_{ij}a_k, where πij\pi_{ij} is the product of the fixed node values on the path. Under fHf_H, units of entries (i,j)(i,j) and (i,l)(i,l) with j≠lj\ne l are coupled with J=2vij,kvil,k′HjlJ=2v_{ij,k}v_{il,k'}H_{jl}, the coefficient of zij,kzil,k′z_{ij,k}z_{il,k'} in Equation (4), and units in different rows are not coupled. Under fG,Hf_{G,H}, units of

entries (i,j)≠(i′,l)(i,j) \ne(i',l) are coupled with J=2vij,kvi′l,k′Gii′HjlJ = 2v_{ij,k}v_{i'l,k'}G_{ii'}H_{jl}. Two units of the same leaf (k≠k′)(k \ne k') are coupled with J=2vij,kvij,k′Hjj+2λJ = 2v_{ij,k}v_{ij,k'}H_{jj} + 2\lambda, with GiiHjjG_{ii}H_{jj} in place of HjjH_{jj} under fG,Hf_{G,H}. Every unit has the field hij,k=vij,kHjj−2vij,k(WH)ij−λh_{ij,k} = v_{ij,k}H_{jj} - 2v_{ij,k}(WH)_{ij} - \lambda, or vij,kGiiHjj−2vij,k(GWH)ij−λv_{ij,k}G_{ii}H_{jj} - 2v_{ij,k}(GWH)_{ij} - \lambda under fG,Hf_{G,H}, up to a constant. (ii) With the node states free, and every node value affine in one bit or linear in one one-hot group, the energy is a polynomial of degree at most 2D+22D + 2 for a tree of depth DD, and each of its terms involves the units of at most two root-to-leaf paths. Auxiliary units and penalties reduce it to a quadratic function [6, 31]. (iii) If λ\lambda exceeds the range of the error over all binary assignments, every ground state satisfies the one-hot constraints, and the matrix it decodes to minimizes the error over M(T)\mathcal{M}(\mathcal{T}).

Proof. (i) With eie_i the ii-th row of EE, fH=∑ieiHeiTf_H = \sum_i e_i H e_i^{\mathsf{T}} and fG,H=∑i,i′Gii′eiHei′Tf_{G,H} = \sum_{i,i'} G_{ii'}e_iHe_{i'}^{\mathsf{T}}. Substitute W^ij\widehat{W}_{ij}, which is linear in the leaf units, and use z2=zz^2 = z. (ii) By assumption, each node value is affine in one bit or linear in a one-hot group, so W^ij\widehat{W}_{ij} is a polynomial of degree at most D+1D + 1 in the units on its path, and the error is quadratic in the entries. A lookup whose value depends on its own state and on the state of an ancestor is bilinear in their units, and raises the degree by at most one for each ancestor it reads. (iii) An assignment that violates a one-hot constraint pays a penalty of at least λ\lambda, which then exceeds the difference between the error of any feasible assignment and the smallest error overall.

Convolutions. A convolution computes Wpatch⁡(p)W\operatorname{patch}(p) at every position pp with the same kernel matrix WW. Written as one matrix acting on the whole input, its blocks for different positions are copies of WW at shifted columns, and each copy is a reference to one shared subtree. Grouped and depthwise convolutions are block-diagonal over channel groups, that is, disjoint channel subtrees.

Experimental details

Common setup. Perplexity is measured at context 2048 on WikiText-2, C4 and FineWeb; FP16 LLaMA-3-8B gives 6.14, 9.44 and 7.85 in the same pipeline. Matrices are compressed one block after another, with Hessians computed afresh from 128 FineWeb calibration sequences and keeping the attention-sink token. MMLU and GSM8K are evaluated 5-shot with lm-eval, with the same settings for every model. Compression and healing use PyTorch 2.7.1 and Transformers 5; serving uses vLLM 0.32.0 with PyTorch 2.13.0 and CUDA 12.9. All GPU measurements are on an A100-SXM4-40GB.

Lossless storage. Each row is split into groups of 64 consecutive weights. The group node stores the largest BF16 exponent EE of the group (8 bits); each weight stores the state D=E−e∈{0,…,14}D = E - e \in\{0,\ldots,14\} of its exponent ee (4 bits) and a leaf with its sign and 7-bit mantissa (8 bits), 12.125 bits per weight. The state 15 is an escape: a weight with D≥15D \ge15, which includes exact zeros and subnormals, has its leaf set to zero and is stored in a side list with its 16 BF16 bits and its row and column, 80 bits in all. Escapes are rare, 0.0095% of the weights of Llama-3.2-1B and 0.0097% of those of Qwen3.5-9B and at most 0.014% in any layer, so whole models, embeddings and output head included, take 12.133 bits per weight on disk. At runtime every escape is repacked as one 32-bit entry, and the kernel layout of a single LLaMA-3-8B matrix takes 12.137 bits per weight. The fused kernel patches escaped weights in registers from a 64-byte block per warp unit, holding a bit mask, a count and up to 13 entries, and reads any further escapes from a global list. Every weight of every matrix tested decodes to its exact BF16 bits.

Whole-model optimizer. Every block linear layer receives the same menu of quantization, pruning and low-rank edits, alone and combined, with no rotation and no trellis-coded quantizer; the menus will be described in a follow-up paper. The cost of an option is the measured curvature cost of § 9, on 16 calibration sequences. GPTQ at 4, 3 and 2 bits is measured for all 224 matrices; the costs of the other options are first interpolated along each matrix’s curve of cost against fHf_H. Every option the solver picks is then built and measured, and the knapsack is solved again until the whole plan has been measured; in the 4.25-bit run (26.6% of the FP16 bytes) this took nine rounds, and the 3.25-bit run of Section 9 uses 20.3% of the bytes of the block weights. Three further rounds re-measure the costs with the whole plan applied.

Ising healing. The 2.44-bit model, an illustration, is Qwen2.5-1.5B-Instruct compressed without training by the optimizer with a wider menu, to 15.2% of the bytes of its block weights; the menu will be described in a follow-up paper. Healing starts from a rebuild that reruns the whole pipeline with a recorder of the leaf states. Its re-measured costs give a slightly different plan, with perplexities of 13.74, 20.95 and 20.88 on WikiText-2, C4 and FineWeb against 13.63, 20.75 and 20.71 for the first run; a second rebuild gave 13.72, 20.84 and 20.85, so runs differ by about 0.1. All gains are measured against the rebuild. Only leaves of the GPTQ family, 6.8% of the weights, can move; all other leaves stay fixed. Each step estimates the gradient of the KL divergence and its Kronecker factors H=E[xx⊤]H = \mathbb{E}[xx^{\top}] and G=E[gg⊤]G = \mathbb{E}[gg^{\top}] on about 45k tokens, with labels sampled from the student. A move must lower the energy by more than a threshold, set so that a fraction qq of the weights qualifies; the lowest energy among no move, the greedy update and simulated bifurcation started from it is kept; and the step is accepted only if the validation KL improves, after which qq grows by a factor of 1.5, or else shrinks by a factor of 0.3. There are 40 steps. After healing, the perplexities are 12.85, 19.51 and 20.02. In a solver ablation with the same model, data and number of steps, greedy updates alone reach a validation KL of 0.378 (GSM8K 20.32, MMLU 49.49), simulated bifurcation 0.371 (21.00, 49.29), local search 0.369 and random moves 0.383; the reported run keeps the best of no move, the greedy update and simulated bifurcation at every step.

Image coding on CLIC. On the 41 images of the CLIC 2020 professional validation set, the GPU codec needs 8.51 bits per pixel, against 7.88 for JPEG XL at effort 9 (7.97 at effort 7), 8.81 for lossless WebP and 11.71 for PNG, all run through imagecodecs 2026.3.6 on CPU (libjxl 0.11.2; libwebp 1.6.0 at method 4, against method 6 on Kodak; libpng 1.6.55 with zlib at level 9). The whole set decodes at 2.86 Gpixel/s end to end, 3.46 Gpixel/s for the kernels alone, and one image at a time at 0.59–0.66 Gpixel/s. JPEG 2000 and HTJ2K were measured on Kodak only.

References

  1. [1]D. H. Ackley, G. E. Hinton, T. J. Sejnowski. A learning algorithm for Boltzmann machines. Cognitive Science, 9(1):147–169, 1985.
  2. [2]E. Agustsson, R. Timofte. NTIRE 2017 challenge on single image super-resolution: dataset and study. CVPR Workshops, 2017.DOI
  3. [3]J. Alakuijala et al. JPEG XL next-generation image compression architecture and coding tools. Proc. SPIE 11137, Applications of Digital Image Processing XLII, 2019.
  4. [4]V. L. Arlazarov, E. A. Dinic, M. A. Kronrod, I. A. Faradzev. On economical construction of the transitive closure of an oriented graph. Soviet Mathematics Doklady, 1970.
  5. [5]L. Babai. On Lovász’ lattice reduction and the nearest lattice point problem. Combinatorica, 6(1):1–13, 1986.
  6. [6]E. Boros, P. L. Hammer. Pseudo-Boolean optimization. Discrete Applied Mathematics, 123:155–225, 2002.DOI
  7. [7]R. E. Bryant, Y.-A. Chen. Verification of arithmetic circuits with binary moment diagrams. Design Automation Conference (DAC), 1995.DOI
  8. [8]K. Chellapilla, S. Puri, P. Simard. High performance convolutional neural networks for document processing. International Workshop on Frontiers in Handwriting Recognition, 2006.
  9. [9]H. Chen, Y. Wang, C. Xu, B. Shi, C. Xu, Q. Tian, C. Xu. AdderNet: do we really need multiplications in deep learning? CVPR, 2020.arxiv.org/abs/1912.13200
  10. [10]J. Chen, Y. Shabanzadeh, E. Crnčević, T. Hoefler, D. Alistarh. The geometry of LLM quantization: GPTQ as Babai’s nearest plane algorithm. ICLR, 2026.arxiv.org/abs/2507.18553
  11. [11]S. A. Cuccaro, T. G. Draper, S. A. Kutin, D. P. Moulton. A new quantum ripple-carry addition circuit. arXiv:quant-ph/0410184, 2004.DOI
  12. [12]K. Culik II, J. Kari. Image compression using weighted finite automata. Computers & Graphics, 17(3):305–313, 1993.
  13. [13]T. Dao, A. Gu, M. Eichhorn, A. Rudra, C. Ré. Learning fast algorithms for linear transforms using butterfly factorizations. ICML, 2019.arxiv.org/abs/1903.05895
  14. [14]J. Duda. Asymmetric numeral systems: entropy coding combining speed of Huffman coding with compression rate of arithmetic coding. arXiv:1311.2540, 2013.arxiv.org/abs/1311.2540
  15. [15]C. Eckart, G. Young. The approximation of one matrix by another of lower rank. Psychometrika, 1936.DOI
  16. [16]V. Egiazarian, A. Panferov, D. Kuznedelev, E. Frantar, A. Babenko, D. Alistarh. Extreme compression of large language models via additive quantization. ICML, 2024.arxiv.org/abs/2401.06118
  17. [17]M. Elhoushi, Z. Chen, F. Shafiq, Y. H. Tian, J. Y. Li. DeepShift: towards multiplication-less neural networks. CVPR Workshops, 2021.
  18. [18]J. Faraone, M. Kumm, M. Hardieck, P. Zipf, X. Liu, D. Boland, P. H. W. Leong. AddNet: deep neural networks using FPGA-optimized multipliers. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 28(1), 2020.DOI
  19. [19]E. Farhi, J. Goldstone, S. Gutmann. A quantum approximate optimization algorithm. arXiv:1411.4028, 2014.arxiv.org/abs/1411.4028
  20. [20]E. Frantar, S. P. Singh, D. Alistarh. Optimal Brain Compression: a framework for accurate post-training quantization and pruning. NeurIPS, 2022.arxiv.org/abs/2208.11580
  21. [21]E. Frantar, D. Alistarh. SPDY: accurate pruning with speedup guarantees. ICML, 2022.arxiv.org/abs/2201.13096
  22. [22]E. Frantar, S. Ashkboos, T. Hoefler, D. Alistarh. GPTQ: accurate post-training quantization for generative pre-trained transformers. ICLR, 2023.arxiv.org/abs/2210.17323
  23. [23]E. Frantar, D. Alistarh. SparseGPT: massive language models can be accurately pruned in one-shot. ICML, 2023.arxiv.org/abs/2301.00774
  24. [24]A. Gersho, R. M. Gray. Vector Quantization and Signal Compression. Kluwer, 1992.
  25. [25]F. Giesen. Interleaved entropy coders. arXiv:1402.3392, 2014.arxiv.org/abs/1402.3392
  26. [26]H. Goto, K. Tatsumura, A. R. Dixon. Combinatorial optimization by simulating adiabatic bifurcations in nonlinear Hamiltonian systems. Science Advances, 5(4):eaav2372, 2019.DOI
  27. [27]H. Goto, K. Endo, M. Suzuki, Y. Sakai, T. Kanao, Y. Hamakawa, R. Hidaka, M. Yamasaki, K. Tatsumura. High-performance combinatorial optimization based on classical mechanics. Science Advances, 7(6):eabe7953, 2021.DOI
  28. [28]W. Hackbusch. A sparse matrix arithmetic based on ℋ-matrices. Part I: Introduction to ℋ-matrices. Computing, 62(2):89–108, 1999.DOI
  29. [29]B. Hassibi, D. G. Stork. Second order derivatives for network pruning: optimal brain surgeon. NeurIPS, 1993.
  30. [30]M. Horowitz. Computing’s energy problem (and what we can do about it). IEEE International Solid-State Circuits Conference (ISSCC), 2014.
  31. [31]H. Ishikawa. Transformation of general binary MRF minimization to the first-order case. IEEE TPAMI, 33(6):1234–1249, 2011.DOI
  32. [32]A. J. Izenman. Reduced-rank regression for the multivariate linear model. Journal of Multivariate Analysis, 5(2):248–264, 1975.DOI
  33. [33]B. Jacob, S. Kligys, B. Chen, M. Zhu, M. Tang, A. Howard, H. Adam, D. Kalenichenko. Quantization and training of neural networks for efficient integer-arithmetic-only inference. CVPR, 2018.arxiv.org/abs/1712.05877
  34. [34]T. Kadowaki, H. Nishimori. Quantum annealing in the transverse Ising model. Physical Review E, 58:5355, 1998.DOI
  35. [35]B. N. Khoromskij. O(d log N)-quantics approximation of N-d tensors in high-dimensional numerical modeling. Constructive Approximation, 34(2):257–280, 2011.DOI
  36. [36]S. Kim, A. Gholami, Z. Yao, M. W. Mahoney, K. Keutzer. I-BERT: integer-only BERT quantization. ICML, 2021.arxiv.org/abs/2101.01321
  37. [37]S. Kim, C. Hooper, A. Gholami, Z. Dong, X. Li, S. Shen, M. W. Mahoney, K. Keutzer. SqueezeLLM: dense-and-sparse quantization. ICML, 2024.arxiv.org/abs/2306.07629
  38. [38]S. Kirkpatrick, C. D. Gelatt, M. P. Vecchi. Optimization by simulated annealing. Science, 220(4598):671–680, 1983.
  39. [39]Eastman Kodak. Kodak Lossless True Color Image Suite (PhotoCD PCD0992). http://r0k.us/graphics/kodak/.
  40. [40]Y.-T. Lai, S. Sastry. Edge-valued binary decision diagrams for multi-level hierarchical verification. Design Automation Conference (DAC), 1992.DOI
  41. [41]Z. Lan, M. Chen, S. Goodman, K. Gimpel, P. Sharma, R. Soricut. ALBERT: a lite BERT for self-supervised learning of language representations. ICLR, 2020.arxiv.org/abs/1909.11942
  42. [42]A. Lavin, S. Gray. Fast algorithms for convolutional neural networks. CVPR, 2016.arxiv.org/abs/1509.09308
  43. [43]Y. LeCun, J. S. Denker, S. A. Solla. Optimal brain damage. NeurIPS, 1990.
  44. [44]Y. Li, X. Dong, W. Wang. Additive powers-of-two quantization: an efficient non-uniform discretization for neural networks. ICLR, 2020.
  45. [45]E. Liberty, S. W. Zucker. The Mailman algorithm: a note on matrix–vector multiplication. Information Processing Letters, 2009.
  46. [46]Y. C. Lim, R. Yang, D. Li, J. Song. Signed power-of-two term allocation scheme for the design of digital filters. IEEE Transactions on Circuits and Systems II, 46(5):577–584, 1999.
  47. [47]J. Lin, J. Tang, H. Tang, S. Yang, et al. AWQ: activation-aware weight quantization for on-device LLM compression and acceleration. MLSys, 2024.DOI
  48. [48]Llama Team, AI @ Meta. The Llama 3 herd of models. arXiv:2407.21783, 2024.
  49. [49]A. Lucas. Ising formulations of many NP problems. Frontiers in Physics, 2:5, 2014.DOI
  50. [50]Y. Luo, J. Huang, Y. Cheng, et al. HiFloat4 format for language model inference. arXiv:2602.11287, 2026.arxiv.org/abs/2602.11287
  51. [51]S. Ma, H. Wang, L. 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
  52. [52]S. Ma, H. Wang, et al. BitNet b1.58 2B4T technical report. arXiv:2504.12285, 2025.arxiv.org/abs/2504.12285
  53. [53]J. Martens, R. Grosse. Optimizing neural networks with Kronecker-factored approximate curvature. ICML, 2015.arxiv.org/abs/1503.05671
  54. [54]X. Meng, K. Behdin, H. Wang, R. Mazumder. ALPS: improved optimization for highly sparse one-shot pruning for large language models. NeurIPS, 2024.arxiv.org/abs/2406.07831
  55. [55]D. M. Miller, M. A. Thornton. QMDD: a decision diagram structure for reversible and quantum circuits. International Symposium on Multiple-Valued Logic (ISMVL), 2006.DOI
  56. [56]D. Miyashita, E. H. Lee, B. Murmann. Convolutional neural networks using logarithmic data representation. arXiv:1603.01025, 2016.arxiv.org/abs/1603.01025
  57. [57]M. H. Mubarik, D. D. Weller, N. Bleier, M. Tomei, J. Aghassi-Hagmann, M. B. Taho​ori, R. Kumar. Printed machine learning classifiers. IEEE/ACM MICRO, 2020.DOI
  58. [58]S. Muñiz Subiñas, M. L. González, J. Ruiz Gómez, A. Mata Ali, J. Martínez Martín, M. Franco Hernando, Á. M. García-Vico. Optimization of the quantization of dense neural networks from an exact QUBO formulation. arXiv:2510.16075, 2025.arxiv.org/abs/2510.16075
  59. [59]M. Nagel, R. A. Amjad, M. van Baalen, C. Louizos, T. Blankevoort. Up or down? Adaptive rounding for post-training quantization. ICML, 2020.arxiv.org/abs/2004.10568
  60. [60]I. V. Oseledets. Tensor-train decomposition. SIAM Journal on Scientific Computing, 33(5):2295–2317, 2011.DOI
  61. [61]G. Park, B. Park, M. Kim, S. Lee, J. Kim, B. Kwon, S. J. Kwon, B. Kim, Y. Lee, D. Lee. LUT-GEMM: quantized matrix multiplication based on LUTs for efficient inference in large-scale generative language models. ICLR, 2024.
  62. [62]Qwen Team. Qwen3.5: towards native multimodal agents. https://qwen.ai/blog?id=qwen3.5, February 2026.
  63. [63]G. W. Reitwiesner. Binary arithmetic. Advances in Computers, vol. 1, 1960.DOI
  64. [64]WebP Image Format. IETF RFC 9649, 2024.
  65. [65]B. Darvish Rouhani, D. Lo, R. Zhao, et al. Pushing the limits of narrow precision inferencing at cloud scale with Microsoft floating point. NeurIPS, 2020.
  66. [66]B. Darvish Rouhani, R. Zhao, A. More, et al. Microscaling data formats for deep learning. arXiv:2310.10537, 2023.arxiv.org/abs/2310.10537
  67. [67]B. Darvish Rouhani, R. Zhao, V. Elango, R. Shafpour, M. Hall, et al. With shared microexponents, a little shifting goes a long way. International Symposium on Computer Architecture (ISCA), 2023.arxiv.org/abs/2302.08007
  68. [68]T. J. Sejnowski. Higher-order Boltzmann machines. AIP Conference Proceedings, 151:398–403, 1986.
  69. [69]P. Sinha, A. A. Zoltners. The multiple-choice knapsack problem. Operations Research, 1979.DOI
  70. [70]M. Sun, Z. Liu, A. Bair, J. Z. Kolter. A simple and effective pruning approach for large language models. ICLR, 2024.arxiv.org/abs/2306.11695
  71. [71]Taalas. HC1: a technology demonstrator with Llama 3.1 8B hardwired in silicon. Product announcement, February 2026. https://taalas.com/products/, accessed October 2026.
  72. [72]D. S. Taubman, M. W. Marcellin. JPEG2000: Image Compression Fundamentals, Standards and Practice. Kluwer, 2002.DOI
  73. [73]D. Taubman, A. Naman, R. Mathew. High throughput block coding in the HTJ2K compression standard. IEEE ICIP, 2019.DOI
  74. [74]M. Thoma, M. Groezinger, M. Forstenhäusler, et al. Advancing SVD-based LLM compression via layer-wise error model search. ICML, 2026.arxiv.org/abs/2610.32878
  75. [75]G. Toderici et al. Workshop and Challenge on Learned Image Compression (CLIC2020). CVPR Workshops, 2020.
  76. [76]A. Tseng, Q. Sun, D. Hou, C. De Sa. QTIP: quantization with trellises and incoherence processing. NeurIPS, 2024.arxiv.org/abs/2406.11235
  77. [77]A. Tseng, J. Chee, Q. Sun, V. Kuleshov, C. De Sa. QuIP#: even better LLM quantization with Hadamard incoherence and lattice codebooks. ICML, 2024.arxiv.org/abs/2402.04396
  78. [78]A. Tseng, Z. Sun, C. De Sa. Model-preserving adaptive rounding. ICML, 2026.arxiv.org/abs/2505.22988
  79. [79]M. van Baalen, A. Kuzmin, I. Koryakovskiy, M. Nagel, P. Couperus, C. Bastoul, E. Mahurin, T. Blankevoort, P. Whatmough. GPTVQ: the blessing of dimensionality for LLM quantization. arXiv:2402.15319, 2024.
  80. [80]A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, I. Polosukhin. Attention is all you need. NeurIPS, 2017.arxiv.org/abs/1706.03762
  81. [81]Y. Voronenko, M. Püschel. Multiplierless multiple constant multiplication. ACM Transactions on Algorithms, 2007.DOI
  82. [82]Z. Wang, B. C. M. Choong, T. Huang, D. Gerlinghoff, R. S. M. Goh, C. Liu, T. Luo. Is quantum optimization ready? An effort towards neural network compression using adiabatic quantum computing. arXiv:2505.16332, 2025.arxiv.org/abs/2505.16332
  83. [83]J. Wang, Y. Chen, I. Lin, B. Li, G. L. Zhang. Basis sharing: cross-layer parameter sharing for large language model compression. ICLR, 2025.arxiv.org/abs/2410.03765
  84. [84]X. Wang, Y. Zheng, Z. Wan, M. Zhang. SVD-LLM: truncation-aware singular value decomposition for large language model compression. ICLR, 2025.arxiv.org/abs/2403.07378
  85. [85]J. Wei, S. Cao, T. Cao, L. Ma, L. Wang, Y. Zhang, M. Yang. T-MAC: CPU renaissance via table lookup for low-bit LLM deployment on edge. arXiv:2407.00088, 2024.DOI
  86. [86]C. Xu, J. Yao, Z. Lin, W. Ou, Y. Cao, Z. Wang, H. Zha. Alternating multi-bit quantization for recurrent neural networks. ICLR, 2018.arxiv.org/abs/1802.00150
  87. [87]Z. Yao, Z. Dong, Z. Zheng, A. Gholami, J. Yu, E. Tan, L. Wang, Q. Huang, Y. Wang, M. W. Mahoney, K. Keutzer. HAWQ-V3: dyadic neural network quantization. ICML, 2021.
  88. [88]H. You, X. Chen, Y. Zhang, C. Li, S. Li, Z. Liu, Z. Wang, Y. Lin. ShiftAddNet: a hardware-inspired deep network. NeurIPS, 2020.arxiv.org/abs/2010.12785
  89. [89]H. You, Y. Guo, Y. Fu, et al. ShiftAddLLM: accelerating pretrained LLMs via post-training multiplication-less reparameterization. NeurIPS, 2024.arxiv.org/abs/2406.05981
  90. [90]A. Zhou, A. Yao, Y. Guo, L. Xu, Y. Chen. Incremental network quantization: towards lossless CNNs with low-precision weights. ICLR, 2017.arxiv.org/abs/1702.03044
  91. [91]A. Ali, B. Mohammad, D. Makhov, D. Shopkhoev, M. Zhussip, S. Lefkimiatis. ROCKET: rapid optimization via calibration-guided knapsack enhanced truncation for efficient model compression. arXiv:2602.11008, 2026.arxiv.org/abs/2602.11008
  92. [92]D. Makhov, D. Shopkhoev, M. Zhussip, A. Ali, S. Lefkimiatis. CoSpaDi: compressing LLMs via calibration-guided sparse dictionary learning. arXiv:2509.22075, 2025.arxiv.org/abs/2509.22075
  93. [93]D. Makhov, D. Shopkhoev, M. Zhussip, A. Ali, B. Mohammad, S. Lefkimiatis. COM-POT: calibration-optimized matrix Procrustes orthogonalization for transformers compression. arXiv:2602.15200, 2026.arxiv.org/abs/2602.15200
  94. [94]B. Mohammad, A. Ali, S. Lefkimiatis. GeoPair: geometry-preserving cross-layer factorization for training-free transformer compression. arXiv:2609.25963, 2026.arxiv.org/abs/2609.25963
  95. [95]D. Shopkhoev, A. Ali, M. Zhussip, V. Malykх, S. Lefkimiatis, N. Komodakis, S. Zagoruyko. ReplaceMe: network simplification via depth pruning and transformer block linearization. NeurIPS, 2025.arxiv.org/abs/2505.02819
  96. [96]M. Zhussip, D. Shopkhoev, A. Ali, S. Lefkimiatis. Share your attention: transformer weight sharing via matrix-based dictionary learning. AAAI, 2026.

Paper details

vlnc:W_zjm4xym6
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 1

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents