arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.26538cs.LGcs.AI
收藏

CascadeFormer: 由梯度扇入不对称性启发的深度锥形Transformer

CascadeFormer: Depth-Tapered Transformers Motivated by Gradient Fan-in Asymmetry

KAIST(韩国科学技术院)

Huzama Ahmad, Cao Viet Hai Nam, Se-Young Yun

AI总结:

针对深层Transformer中深层贡献不足的问题,提出CascadeFormer通过锥形宽度匹配信息流,以及CascadeFlow Pruning利用梯度剪枝层,基于梯度扇入不对称性(GFA)理论解释深层贡献少的原因。

摘要:

深度Transformer由均匀堆叠的残差块组成,但其最深层往往贡献甚微。我们提出了两种利用这种不对称性的效率方法。CascadeFormer根据深度锥形化宽度以匹配跨层的不均匀信息流,在相同训练预算下达到与均匀基线相当困惑度的同时,延迟降低8.6%,吞吐量提升9.4%。CascadeFlow Pruning利用累积训练梯度移除层,无需事后分析。它在困惑度和秩稳定性上优于标准启发式方法,并在下游准确率上保持竞争力。为了启发这些方法,我们提出梯度扇入不对称性(GFA)作为深层贡献较少的结构性解释。在Pre-LayerNorm残差堆栈中,某一层的梯度是恒等路径和所有下游功能路径之和,产生随深度线性衰减的梯度扇入(在深度监督下呈二次衰减),从而为早期层提供更丰富的梯度,为后期层提供更稀疏的梯度。我们在从头训练至12亿参数的模型上提供了GFA的相关性和干预性证据。在Transformer和ResNet中,累积训练梯度遵循理论扇入,并与事后层重要性相关。两种干预措施表明瓶颈在于结构而非幅度:均衡每层梯度范数不能恢复后期层的价值,而通过参数共享重复增加下游路径计数则能恢复并提升其价值。梯度幅度是否在高秩区域之外代理扇入,以及这些动态在1000亿+规模下的表现,仍是开放问题。

英文摘要:

Deep Transformers are composed of uniformly stacked residual blocks, yet their deepest layers often add little value. We present two efficiency methods that exploit this asymmetry. CascadeFormer tapers width with depth to match the uneven information flow across layers, achieving comparable perplexity to a uniform baseline at the same training budget while reducing latency by 8.6% and increasing throughput by 9.4%. CascadeFlow Pruning removes layers using accumulated training gradients, with no post hoc analysis. It outperforms standard heuristics on perplexity and rank-stability and stays competitive on downstream accuracy. To motivate these methods, we propose Gradient Fan-in Asymmetry (GFA) as a structural account of why deeper layers contribute less. In Pre-LayerNorm residual stacks, the gradient at a layer is the sum of an identity path and all downstream functional paths, producing a gradient fan-in that decays linearly with depth (and quadratically under deep supervision), yielding richer gradients for early layers and sparser ones for later layers. We provide correlational and interventional evidence for GFA on models trained from scratch up to 1.2B parameters. Across Transformers and ResNets, accumulated training gradients follow the theoretical fan-in and are associated with post hoc layer importance. Two interventions point to structure rather than magnitude as the bottleneck: equalizing per-layer gradient norms does not restore late-layer value, while increasing downstream path counts via parameter-shared repetition restores and elevates it. Whether gradient magnitude proxies fan-in beyond high-rank regimes, and how these dynamics behave at the 100B+ scale, remain open questions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑