arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2509.16629cs.LGq-bio.QM
收藏

因果性位置编码:面向非序列特征的Transformer表示学习

Causality-Induced Positional Encoding for Transformer-Based Representation Learning of Non-Sequential Features

Department of Computer Science, Emory University(埃默里大学计算机科学系);School of Statistics and Mathematics, Zhongnan University of Economics and Law(中南财经政法大学统计与数学学院);School of Medicine, Department of Human Genetics, Emory University(埃默里大学医学院人类遗传学系)

Kaichen Xu, Yihang Du, Mianpeng Liu, Zimu Yu, Xiaobo Sun

AI总结:

针对现有位置编码需预定义特征顺序、不适用于非序列因果特征的问题,提出CAPE方法,通过结构方程建模因果DAG并嵌入双曲空间生成因果感知旋转位置编码,增强Transformer自注意力,经理论与实验验证有效。

摘要:

位置编码对于为Transformer补充词元的位置信息至关重要。现有的位置编码方法要求预先定义词元/特征的顺序,这使得它们不适用于具有非序列但因果相关特征的真实世界数据。为解决这一局限,我们提出CAPE,一种新颖的方法,通过广义结构方程建模,将非序列特征上的潜在因果结构识别为加权有向无环图(DAG)。随后,该DAG被嵌入到双曲空间中,其几何结构通过基于双曲面模型的方法得以良好保留,该方法能有效捕捉两个重要的因果图属性(因果强度与因果特异性)。此步骤为特征生成因果感知的位置编码,并将其转换为旋转形式以集成到Transformer的自注意力机制中。理论分析表明,CAPE生成的旋转位置编码具有三个对增强自注意力有价值属性,包括因果距离引起的衰减、因果泛化引起的衰减以及对位置扰动的鲁棒性。我们在合成和真实数据集上评估CAPE,实证证明了其理论属性及在增强Transformer处理非序列特征数据方面的有效性。我们的代码可在https://github.com/Catchxu/CAPE获取。

英文摘要:

Positional encoding is essential for supplementing transformer with positional information of tokens. Existing positional encoding methods demand predefined token/feature order, rendering them unsuitable for real-world data with non-sequential yet causally-related features. To address this limitation, we propose CAPE, a novel method that identifies underlying causal structure over non-sequential features as a weighted directed acyclic graph (DAG) using generalized structural equation modeling. The DAG is then embedded in hyperbolic space where its geometric structure is well-preserved using a hyperboloid model-based approach that effectively captures two important causal graph properties (causal strength & causal specificity). This step yields causality-aware positional encodings for the features, which are converted into their rotary form for integrating with transformer's self-attention mechanism. Theoretical analysis reveals that CAPE-generated rotary positional encodings possess three valuable properties for enhanced self-attention, including causal distance-induced attenuation, causal generality-induced attenuation, and robustness to positional disturbances. We evaluate CAPE over both synthetic and real-word datasets, empirically demonstrating its theoretical properties and effectiveness in enhancing transformer for data with non-sequential features. Our code is available at https://github.com/Catchxu/CAPE.

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

↑