Skip to main content
QUICK REVIEW

[论文解读] Beyond Fully-Connected Layers with Quaternions: Parameterization of Hypercomplex Multiplications with $1/n$ Parameters

Aston Zhang, Yi Tay|arXiv (Cornell University)|Feb 17, 2021
Computational Physics and Python Applications参考文献 17被引用 36
一句话总结

本文介绍参数化超复杂乘法(PHM)层,从数据中学习超复杂乘法规则,使得任意n维超复杂空间成为可能,参数量约为标准全连接层的1/n,并在 LSTMs 和 Transformers 中进行了演示。

ABSTRACT

Recent works have demonstrated reasonable success of representation learning in hypercomplex space. Specifically, "fully-connected layers with Quaternions" (4D hypercomplex numbers), which replace real-valued matrix multiplications in fully-connected layers with Hamilton products of Quaternions, both enjoy parameter savings with only 1/4 learnable parameters and achieve comparable performance in various applications. However, one key caveat is that hypercomplex space only exists at very few predefined dimensions (4D, 8D, and 16D). This restricts the flexibility of models that leverage hypercomplex multiplications. To this end, we propose parameterizing hypercomplex multiplications, allowing models to learn multiplication rules from data regardless of whether such rules are predefined. As a result, our method not only subsumes the Hamilton product, but also learns to operate on any arbitrary nD hypercomplex space, providing more architectural flexibility using arbitrarily $1/n$ learnable parameters compared with the fully-connected layer counterpart. Experiments of applications to the LSTM and Transformer models on natural language inference, machine translation, text style transfer, and subject verb agreement demonstrate architectural flexibility and effectiveness of the proposed approach.

研究动机与目标

  • 提出对超复杂乘法进行参数化,以克服现有超复杂层在维度上的固定限制(4D/8D/16D)。
  • 提出PHM层,将乘法规则表达为Kronecker积的可学习和和,从而实现任意n维超复杂空间。
  • 展示PHM层在LSTM和Transformer架构中降低参数量,同时保持或提升性能。
  • 通过自然语言推理、机器翻译、文本风格迁移和主谓一致等任务,展示其适用性。

提出的方法

  • 定义PHM层,计算 y = Hx + b,其中 H 构造为Kronecker积之和 H = sum_{i=1}^n A_i ⊗ S_i。
  • 确保 k 和 d 能被用户定义的 n 整除,其中 A_i ∈ R^{n×n} 且 S_i ∈ R^{k/n × d/n}。
  • 在温和假设下,PHM层的参数量约为 (kd)/n,从而约为标准全连接层的1/n。
  • 证明PHM包含实值矩阵乘法(n=1)和四元数空间的哈密顿积(n=4),并且可以推广到八元数/十六元数(n=8,16)。
  • 解释PHM如何通过相应地设定A_i和S_i来表达预定义的超复杂法则(如哈密顿乘积),并从数据中学习新的乘法交互。

实验结果

研究问题

  • RQ1一个可学习的超复杂乘法层是否能从4D/8D/16D等固定空间推广到任意维度?
  • RQ2PHM在NLP任务中是否在显著降低参数量的同时保持或提升性能?
  • RQ3PHM在LSTM和Transformer架构中对自然语言推理、机器翻译等任务的表现如何?
  • RQ4不同n值对各任务的性能和参数效率有何影响?

主要发现

  • PHM-LSTM在不同n取值下将参数量降低最多达88.7%,并且在五个NLI数据集上通常可与标准LSTM相媲美或有所提升。
  • PHM-Transformer在七个MT数据集上实现了显著的参数减少(最高可达93.4%),同时BLEU分数具有竞争力;在许多情况下n=4或n=2相对于四元数/标准Transformers表现更优。
  • PHM层提供架构灵活性,在包括文本风格迁移和主谓一致等任务上优于基线。
  • 增大n值可以带来更多的参数节省,但在某些数据集(如En-Id)上,n很大时可能略有下降。
  • PHM能够学习类似哈密顿积的行为(n=4),并且在数据驱动学习下往往优于固定的超复杂规则。
  • 在机器翻译中,通过将隐藏层大小重新标定(倍增)并使用PHM,可以在若干数据集上提升表现。

更好的研究,从现在开始

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

无需绑定信用卡

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