揭示近线性RNN中非线性在序列建模中的计算作用
Uncovering the Computational Roles of Nonlinearity in Sequence Modeling Using Almost-Linear RNNs
AI总结:
通过近线性RNN揭示非线性在序列建模中的计算作用,证明稀疏非线性可提升可解释性和效率。
摘要:
跨领域如自然语言处理、时间序列预测和控制的序列建模任务需要学习复杂的输入输出映射。非线性递归理论上是通用近似序列到序列函数的必需条件,但线性递归模型却常常出人意料地有效。这引发了非线性是否真正必要的问题。我们提出一个框架,系统地分解递归网络中非线性的功能作用,确定何时非线性是计算必需的以及它启用了哪些机制。我们通过几乎线性递归神经网络(AL-RNNs)来解决这个问题,这些网络允许递归非线性逐渐减弱,并将网络动态分解为可分析的线性区域,使计算机制变得明确。我们展示了该框架在多样化的合成和现实任务中的应用,包括经典序列建模基准、神经科学刺激选择任务和多任务套件。我们展示了AL-RNN的分段线性结构如何使识别计算原语如门控、基于规则的整合和依赖记忆的瞬态成为可能,揭示这些操作主要在以线性骨架为基础中出现。在各种任务中,稀疏非线性通过减少和局部化非线性计算提高了可解释性,在多任务设置中促进了共享表示,并降低了计算成本。此外,稀疏非线性在低数据情况下或当任务需要在线性区域之间进行离散切换时,稀疏非线性模型往往能匹配或超过完全非线性架构。我们的发现提供了一种原则性的方法来确定非线性在何处是功能必需的,指导设计平衡性能、效率和可解释性的递归架构。
英文摘要:
Sequence modeling tasks across domains such as natural language processing, time series forecasting, and control require learning complex input-output mappings. Nonlinear recurrence is theoretically required for universal approximation of sequence-to-sequence functions, yet linear recurrent models often prove surprisingly effective. This raises the question of when nonlinearity is truly required. We present a framework to systematically dissect the functional role of nonlinearity in recurrent networks, identifying when it is computationally necessary and what mechanisms it enables. We address this using Almost Linear Recurrent Neural Networks (AL-RNNs), which allow recurrence nonlinearity to be gradually attenuated and decompose network dynamics into analyzable linear regimes, making computational mechanisms explicit. We illustrate the framework across diverse synthetic and real-world tasks, including classic sequence modeling benchmarks, a neuroscientific stimulus-selection task, and a multi-task suite. We demonstrate how the AL-RNN's piecewise linear structure enables identification of computational primitives such as gating, rule-based integration, and memory-dependent transients, revealing that these operations emerge within predominantly linear backbones. Across tasks, sparse nonlinearity improves interpretability by reducing and localizing nonlinear computations, promotes shared representations in multi-task settings, and reduces computational cost. Moreover, sparse nonlinearity acts as a useful inductive bias: in low-data regimes or when tasks require discrete switching between linear regimes, sparsely nonlinear models often match or exceed fully nonlinear architectures. Our findings provide a principled approach for identifying where nonlinearity is functionally necessary, guiding the design of recurrent architectures that balance performance, efficiency, and interpretability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。