ComplexFormer:通过 Head-Specific Complex Vector Attention 突破 Transformer 推理能力
摘要
Transformer 模型依赖自注意力机制捕获 token 依赖关系,但面临在有效整合位置信息的同时保持多头注意力 (MHA) 灵活性的挑战。先前方法常分别建模语义与位置差异,或对各头统一施加位置调整,可能限制表示容量。本文介绍 ComplexFormer,特点是 Complex Multi-Head Attention (CMHA)。CMHA 使每个注意力头独立地在复平面上统一建模语义与位置差异,将相互作用表示为旋转和缩放。ComplexFormer 包含两个关键改进:(1) 每头欧拉变换,将实值查询/键投影转换为极形式的复向量,以实现每头的复子空间操作;(2) 每头自适应微分旋转机制,,允许每个头学习不同的策略来整合语义角度差异 与相对位置编码 。在语言建模、文本生成、代码生成和数学推理等大量实验中,ComplexFormer 实现了优异的性能,显著降低生成困惑度,并在长程语境连贯性方面优于如 RoPE-Transformer 等强大基线。ComplexFormer 在参数效率方面表现出色,提供了更具表达力和适应性的注意力机制。
关键词
引用
@article{arxiv.2505.10222,
title = {ComplexFormer: Disruptively Advancing Transformer Inference Ability via Head-Specific Complex Vector Attention},
author = {Jintian Shao and Hongyi Huang and Jiayi Wu and Beiwen Zhang and ZhiYu Wu and You Shan and MingKai Zheng},
journal= {arXiv preprint arXiv:2505.10222},
year = {2025}
}
备注
We are withdrawing this submission as the underlying experiment is currently incomplete. We require additional time to gather more data and supplement the existing findings to ensure a comprehensive and robust presentation. We intend to resubmit once these additions are finalized