arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2603.10985cs.LG
收藏

MLP的离散魅力:Transformer前馈层中连续信号的二进制路由

The Discrete Charm of the MLP: Binary Routing of Continuous Signals in Transformer Feed-Forward Layers

Peter Balogh

AI总结:

Transformer前馈层通过二进制路由机制对连续信号进行处理,该机制在不同层中逐步形成共识与异常处理架构,验证了二进制决策在非线性处理中的有效性。

摘要:

我们证明了Transformer语言模型中的MLP层对连续信号进行二进制路由:是否需要对token进行非线性处理的决定可以很好地由二进制神经元激活来捕捉,尽管被路由的信号是连续的。在GPT-2 Small(124M参数)中,我们发现特定的神经元实现了共识架构——七个“默认开启”神经元和一个例外处理程序(N2123在第11层),它们在93-98%的程度上互斥,形成一个二进制路由开关。跨层分析揭示出一个发展曲线:早期层(L1-3)使用单个网关神经元路由异常,没有共识多数;中层(L4-6)显示扩散处理,既没有网关也没有共识;晚期层(L7-11)逐渐形成完整的共识/异常架构,共识神经元数量逐渐增加(1到3到7个)。因果验证确认了路由的实用性:在共识破裂时移除MLP会导致43.3%的困惑度增加,而在完全共识时移除它只导致10.1%的增加——超过4倍的差异。比较二进制与连续特征用于路由决策确认,二值化几乎不丢失信息(79.2% vs. 78.8%准确率),而连续激活携带额外的幅度信息(R² = 0.36 vs. 0.22)。这种二进制路由结构解释了为什么平滑多项式近似失败:交叉验证的多项式拟合(2-7次方)在高度非线性层中从未超过R² = 0.06。我们提出,已建立的深度网络分段仿射特征可以补充一个路由特征:沿着自然数据流形,分段边界实施关于哪些token需要非线性处理的二进制决策,将连续信号路由通过质上不同的计算路径。

英文摘要:

We show that MLP layers in transformer language models perform binary routing of continuous signals: the decision of whether a token needs nonlinear processing is well-captured by binary neuron activations, even though the signals being routed are continuous. In GPT-2 Small (124M parameters), we find that specific neurons implement a consensus architecture -- seven "default-ON" neurons and one exception handler (N2123 in Layer 11) that are 93-98% mutually exclusive -- creating a binary routing switch. A cross-layer analysis reveals a developmental arc: early layers (L1-3) use single gateway neurons to route exceptions without consensus quorums; middle layers (L4-6) show diffuse processing with neither gateway nor consensus; and late layers (L7-11) crystallize full consensus/exception architectures with increasing quorum size (1 to 3 to 7 consensus neurons). Causal validation confirms the routing is functional: removing the MLP at consensus breakdown costs 43.3% perplexity, while at full consensus removing it costs only 10.1% -- exceeding a 4x difference. Comparing binary vs. continuous features for the routing decision confirms that binarization loses essentially no information (79.2% vs. 78.8% accuracy), while continuous activations carry additional magnitude information (R^2 = 0.36 vs. 0.22). This binary routing structure explains why smooth polynomial approximation fails: cross-validated polynomial fits (degrees 2-7) never exceed R^2 = 0.06 for highly nonlinear layers. We propose that the well-established piecewise-affine characterization of deep networks can be complemented by a routing characterization: along the natural data manifold, the piecewise boundaries implement binary decisions about which tokens need nonlinear processing, routing continuous signals through qualitatively different computational paths.

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

↑