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

共享分数的四元数自注意力

Quaternion Self-Attention with Shared Scores

Tokyo Woman's Christian University(东京女子基督教大学)

Shogo Yamauchi, Tohru Nitta, Hideaki Tamori

AI总结:

提出一种共享分数四元数自注意力机制,通过四元数内积计算单一实值分数并共享注意力分布,在保持性能的同时大幅降低计算成本。

摘要:

四元数神经网络通过将四个相关特征表示为一个单一实体,实现了参数高效并建模多维依赖关系。然而,现有的四元数自注意力计算每个分量的分数并对每个分量应用独立的softmax操作,这增加了计算成本并允许注意力分布在分量间发散。我们提出了一种共享分数的四元数自注意力机制,该机制使用四元数内积计算单一实值分数,并在所有分量上应用共享的注意力分布。这将分数计算乘法减少了75%,并将softmax操作次数从四次减少到一次。我们证明,当查询和键由诱导分量预混合的四元数线性投影产生时,分量级分数和共享分数位于相同的交互子空间中,表明独立的分量级注意力主要重新参数化相同的交互,而不是扩展特征交互空间。在语音增强中,我们的方法在GPU上将推理时间减少了高达44.3%,在CPU上减少了58.1%,同时保持了质量,并且在视觉和自然语言处理中呈现一致的趋势。

英文摘要:

Quaternion neural networks are parameter-efficient and model multidimensional dependencies by representing four related features as a single entity. However, existing quaternion self-attention computes component-wise scores and applies independent softmax operations to each component, which increases the computational cost and allows attention distributions to diverge across components. We propose a shared-score quaternion self-attention mechanism that computes a single real-valued score using the quaternion inner product and applies a shared attention distribution across all components. This reduces score-computation multiplications by 75% and the number of softmax operations from four to one. We prove that, when queries and keys are produced by quaternion linear projections that induce component pre-mixing, the component-wise and shared scores lie in the same interaction subspace, indicating that independent component-wise attention primarily re-parameterizes the same interactions rather than expanding the feature interaction space. In speech enhancement, our method reduces inference time by up to 44.3% on a GPU and 58.1% on a CPU while maintaining quality, with consistent trends across vision and natural language processing.

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

↑