arXiv:2610.31931cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.31931

Every Weight Is a Path of Shared Discrete Decisions

Ammar Ali, Stamatis Lefkimmiatis

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

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. The properties of TWIG are proved; the measurements we report are first evidence on selected models and layers.

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

*Corresponding author: ammarali32@itmo.ru

(a) 16-bit float

(b) group scale

(c) shared exponent

(d) TWIG state tree

Figure

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.

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

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.

References (79)