每个权重都是一条共享离散决策的路径
研究论文 · 2026/10/26
本文提出TWIG(带继承门的树结构权重)表示法,将神经网络中的每个权重视为一系列小型离散决策路径的终点:符号、2的幂次移位、零门、共享表索引。共享上层路径的权重只需存储一次决策并应用于所有下层权重。该表示法有三点影响:任何训练好的网络都可写成TWIG,当决策为2的幂时,权重层变为几乎全由导线和加法器组成的电路,适合制造时权重固定的芯片;剪枝、量化、低秩分解、码本和权重共享成为同一对象的编辑操作,单一优化器可为整个网络选择;决策选择是相互作用沿树路径的高阶玻尔兹曼机的基态问题,正是退火器和量子优化器所擅长的问题。当前这些方法各自独立,而TWIG将趋势推向极致,所有常见格式都是浅层TWIG且无额外成本。在大型语言模型的五个权重矩阵上,无组缩放的扁平树按电路成本为每个权重选择带符号的2的幂项,在3位和4位精度下,典型矩阵上比GPTQ减少9-15%的加法,强离群值矩阵上减少20-55%。
TWIG提供了一种统一的权重表示框架,将多种压缩技术整合为一个可联合优化的对象,并连接到量子优化等离散求解器,在大型语言模型上展示了优于GPTQ的电路成本效率,为神经网络压缩和硬件协同设计提供了新思路。
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.