Skip to main content
QUICK REVIEW

[论文解读] Sparse Linear Networks with a Fixed Butterfly Structure: Theory and Practice

Nir Ailon, Omer Leibovich|arXiv (Cornell University)|Jul 17, 2020
Face and Expression Recognition参考文献 41被引用 5
一句话总结

该论文提出用结构化稀疏的蝴蝶网络架构替代神经网络中的密集线性层,将参数量从二次方级降低至近线性级,同时保持模型精度。实验结果表明训练和推理速度更快,理论分析证实该方法在增加深度的情况下仍能保持优化稳定性。

ABSTRACT

A butterfly network consists of logarithmically many layers, each with a linear number of non-zero weights (pre-specified). The fast Johnson-Lindenstrauss transform (FJLT) can be represented as a butterfly network followed by a projection onto a random subset of the coordinates. Moreover, a random matrix based on FJLT with high probability approximates the action of any matrix on a vector. Motivated by these facts, we propose to replace a dense linear layer in any neural network by an architecture based on the butterfly network. The proposed architecture significantly improves upon the quadratic number of weights required in a standard dense layer to nearly linear with little compromise in expressibility of the resulting operator. In a collection of wide variety of experiments, including supervised prediction on both the NLP and vision data, we show that this not only produces results that match and at times outperform existing well-known architectures, but it also offers faster training and prediction in deployment. To understand the optimization problems posed by neural networks with a butterfly network, we also study the optimization landscape of the encoder-decoder network, where the encoder is replaced by a butterfly network followed by a dense linear layer in smaller dimension. Theoretical result presented in the paper explains why the training speed and outcome are not compromised by our proposed approach.

研究动机与目标

  • 将密集线性层的参数量从 O(n²) 降低至接近 O(n log n),同时保持模型表达能力。
  • 在不牺牲性能的前提下,提升深度神经网络的训练与推理速度。
  • 通过蝴蝶结构层分析神经网络的优化景观,尤其关注编码器-解码器设置下的表现。
  • 展示学习得到的截断蝴蝶网络在低秩矩阵逼近和监督学习中的有效性。
  • 探究蝴蝶网络的对数深度是否会影响梯度下降的收敛性。

提出的方法

  • 用组合结构 J₁ᵀW'J₂ 替换标准的密集线性层,其中 J₁ 和 J₂ 为截断的蝴蝶网络,W' 为小型密集层。
  • 以快速约翰逊-林登施特劳斯变换(FJLT)作为理论基础,表示为蝴蝶网络后接随机投影。
  • 将蝴蝶网络构建成具有 O(log n) 深度的分层图结构,每层包含 O(n) 个非零权重,以不相交的 2×2 模块组织。
  • 使用标准反向传播端到端训练小型密集层 W' 的权重,同时保持蝴蝶结构固定。
  • 在低秩逼近实验中,对输入行应用随机排列并归一化矩阵,以在不同数据集间平衡奇异值。
  • 将学习得到的蝴蝶矩阵与稀疏学习矩阵(如 Indyk 等,2019 年)、随机稀疏矩阵(Clarkson 与 Woodruff,2009 年)以及高斯矩阵在低秩逼近任务中进行比较。

实验结果

研究问题

  • RQ1具有固定拓扑结构的稀疏结构化蝴蝶网络能否替代密集线性层,同时保持模型精度?
  • RQ2蝴蝶网络架构的对数深度是否会影响深层网络中梯度下降的收敛性?
  • RQ3在低秩矩阵逼近中,学习得到的蝴蝶草图性能与学习得到的稀疏或随机稀疏草图相比如何?
  • RQ4蝴蝶架构在视觉和自然语言处理任务中,能在多大程度上减少参数量而不损害表达能力?
  • RQ5蝴蝶结构能否在监督学习中有效用于矩阵逼近,如 Indyk 等(2019 年)所研究的那样,并实现更低的逼近误差?

主要发现

  • 所提出的基于蝴蝶的架构在多个 NLP 和视觉基准测试中,测试误差与标准密集层相当或更优。
  • 在低秩矩阵逼近任务中,学习得到的蝴蝶草图在 ℓ=20、k=10 时,测试误差低于稀疏学习矩阵(N=1)和密集学习矩阵(N=20)。
  • 使用蝴蝶架构进行训练显著更快,且在仅几个训练迭代后,模型的测试误差已超越稀疏基线。
  • 理论分析表明,采用蝴蝶编码器的编码器-解码器网络的优化景观保持稳定,支持收敛,即使存在结构化稀疏性。
  • 该方法将参数量从 O(n²) 降低至接近 O(n log n),实现了更快的推理与训练,且精度损失极小。
  • 实证结果表明,用蝴蝶结构替代多个密集层在实际中是可行的,尽管本研究尚未充分探索此方向。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。