Hierarchical Residuals: A Minimalist Decoupling of Residual Width from Compute Width

AK's Picks LLM PTSAD ML TAVR RN
残差连接是Transformer架构的基石,但其隐式地将贯穿网络深度的残差通道宽度(residual width)与各层内部所用的计算通道宽度(compute width)绑定在一起。我们提出一种名为“分层残差”(Hierarchical Residuals,简称HiRes)的极简式架构改进方案,它解耦了这两个维度:在保持每层计算宽度不变的前提下,显著拓宽了残差状态的表示宽度。HiRes将网络层划分为若干“块”(blocks):每个块内部采用标准的d维PreNorm Transformer层;而块与块之间则通过一个更宽的D维PostNorm外层残差路径进行连接。在块边界处,由可学习的读取(read)与写入(write)投影操作实现两种维度空间之间的转换,从而完全不改变单个Transformer层的结构。在不同模型规模与深度的广泛实验中,HiRes始终优于传统的逐元素残差相加方式;拟合得到的缩放律(scaling laws)表明,其浮点运算效率(FLOPs efficiency)提升了1.30倍。在OLMoE-1B-7B模型上开展5000亿token的预训练任务时,HiRes实现了训练损失降低0.0208、下游任务准确率提升1.14个百分点的效果。此外,HiRes在性能上亦可媲美其他残差扩展方法(如VWN、mHC和AttnRes),同时具备更低的激活内存占用与I/O开销。该方法仅依赖于常规的稠密投影(dense projections)与归一化操作,既无需定制化算子(specialized kernels),也无需底层基础设施层面的优化支持。因此,HiRes仅借助标准算子,便将“残差宽度”这一维度真正转化为一个切实可行、易于调节的模型扩展变量。
Residual connections underpin Transformers, but they implicitly tie the residual width carried through depth to the compute width used inside each layer. We introduce Hierarchical Residuals (HiRes), a minimalist architectural change that decouples these dimensions, widening the residual state while keeping per-layer compute width fixed. HiRes groups layers into blocks: standard d-dimensional PreNorm layers operate inside each block, while a wider D-dimensional PostNorm outer residual connects blocks. Learned read/write projections bridge the two spaces at block boundaries, leaving individual Transformer layers unchanged. Across different model sizes and depths, HiRes consistently outperforms vanilla residual addition, with fitted scaling laws indicating a 1.30-fold improvement in FLOPs efficiency. On OLMoE-1B-7B pretraining for 500B tokens, HiRes achieves 0.0208 lower training loss and 1.14-point higher downstream accuracy. HiRes is also competitive with other residual expansion methods such as VWN, mHC and AttnRes with less activation memory and I/O costs. Built from only dense projections and normalizations, it requires neither specialized kernels nor infrastructure-level optimizations. HiRes thus exposes residual width as a practical scaling variable using only standard operators.
许愿